A problem is called "WellKnown" if a similar problem has already been proposed. Dadas, who is proposing problems for the Lemon Cup, wants to avoid proposing WellKnown problems. So he set the following criteria.
- If problem was proposed before problem and the algorithms used in problem include all the algorithms used in problem , then problem is defined as WellKnown.
There are countless algorithms in the world, but Dadas only knows algorithms. Therefore, the problems proposed by Dadas only involve these algorithms.
problems proposed by Dadas are given in the order they were proposed. For each problem, compare it with previously proposed problems, and print WellKnown if it is WellKnown, and AdHoc otherwise. Note that there may exist problems that do not use any algorithms at all.
Input
The input is given in the following format.
The value is defined as follows.
- If , .
- If , if the -th problem is WellKnown, and otherwise.
, a binary string of length represents the information of the -th problem. The interpretation of the string changes depending on the value of .
- If : If the -th character of is , -th algorithm is used in the -th problem, and if it is , it is not used.
- If : If the -th character of is , -th algorithm is used in the -th problem, and if it is , it is not used.
Output
Print lines.
On the -th line, print whether -th problem is WellKnown or AdHoc.
Constraints
- .
- .