Given queries of an integer , output Y
if it should be and N
if it should be.
Note that this problem will be online enforced, meaning that input will be given in an encrypted format. To encrypt the data, the value in queries will be given as , where denotes the bitwise XOR operation. Note that at any time is defined as the answer to the latest query. If the latest query was a Y
, . If the latest query was an N
, . If no queries have occurred so far, .
Constraints
Input Specification
The first line will contain , the number of queries.
The following lines will contain .
Output Specification
Output answers for each of the queries.
Sample Input (Unencrypted)
2
1
2
Sample Input (Encrypted)
2
1
1431655767
Sample Output
Y
Y
Comments
First Java AC
RNGesus must be on my side today
(Only took 93 tries, def didn't take me 1 week to solve this mhm)