TT loves playing Flying chess very much. So she finds a friend mengya to play with her. But they set a new rule. The rules are following:
One : They control the same one chess.
Two : The chess is only one.
Three : They can control the chess to move forward for 1 to 6(1 or 2 or 3 or 4 or 5 or 6) steps.
Four : TT first, mengya next.
Five : Who control the chess into the end will win the game.
Input until EOF.
Each case contains one integer N(1<=N<=100000), means the distance steps away from the end.
If tt win the game, print "tt wins", else print "mengya wins".