Candy game

0

0 votes
Easy
Problem

Ankir and Onimesh are bored, so they decide to play a fun game. They have n heaps of candies available with each heap having A[i] candies. Starting from Ankir, they take turns. The player having the current turn has to choose a heap and can then remove any number of candies from that heap which is a proper power of two (1,2,4,8…). Obviously, they can’t remove more candies than present in the chosen heap. The person to remove the last candy wins. Quite contrary to reality, we assume that both Ankir and Onimesh are very smart and play the game optimally. Your task is to predict who would win.

Input

The first line contains the value of n.
The next line contains n space separated integers, where the ith integer is A[i].

Output

Print a single line containing either Ankir (if Ankir wins) or Onimesh (if Onimesh wins).

Constraints

1 ≤ n ≤ 1000
1 ≤ A[i] ≤ 109

Time Limit: 2
Memory Limit: 256
Source Limit:
Editor Image

?