GAME3  Yet Another Fancy Game
Two girls  Ivica and Marica  play an interesting game.
First, they randomly choose a natural number N. They also define M = 1.
Ivica plays first, then Marica, then Ivica, then Marica and so on.
In each move, a girl has to increase M by 1 or multiply M by 2 (that is, M = M+1 or M = 2*M). The resulting number must not be greater than N.
The loser of the game is the girl who gets M = N. The other girl is, of course, the winner.
Write a program to determine the winner, assuming that both girls play optimally.
Input
In the first line there is an integer T (1 ≤ T ≤ 5), the number of games.
T lines follow. In i^{th} line there is an integer N (2 ≤ N ≤ 10^{15)}, a chosen number for i^{th} game.
Output
For each of the T games print the name of the winner.
Example
Input:
4
2
3
4
5
Output:
Marica
Ivica
Marica
Marica
hide comments
pavan_kumar1:
20170630 16:04:04
Admin please check the submission id:19708414


Adrian Satja Kurdija:
20160207 20:26:19
@Shubham Porlikar: try this one


Shubham Porlikar:
20150106 21:34:04
@Adrian Satja Kurdija Can you please help with id 13347146? 

vabs:
20140414 06:11:30
someone plz suggest some more inputs , repeatedly getting wa 

adze:
20140410 10:32:36
@STAYING_ALIVE:


RISHABH JAIN:
20140410 10:32:36
My 250th problem :) 

vabs:
20140410 10:32:36
i m a bit confused about the fourth sample test case  if the moves are +1(m) , +1(i) , +1(m), +1(i) ivica wins but for moves +1(m) , x2(i),+1(m) marica wins . so if the state of winning depends on ivica , why will x2 be choosen by her


785227:
20140410 10:32:36
What is the answer for 101 ? 

Shaka Shadows:
20140410 10:32:36
Beautiful pattern Adrian!!!


Rahul Shah:
20140410 10:32:36
whats the o/p for 2 33 11 Last edit: 20130118 12:00:21 
Added by:  Adrian Satja Kurdija 
Date:  20111029 
Time limit:  0.147s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  originated from a mathematical problem 