406151: GYM102279 I Imitater The Potato

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

I. Imitater The Potatotime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

If you have ever enjoyed the classic Plants vs Zombies to the very end of it, surely you have come across a special type of plant in this game: Imitater. If you choose this plant to be with you for a round, it can imitate any kind of plant you want, including its abilities, its stats and even its cost, so you'll have one more slot of that plant for the whole round, double the trouble!

Lowie came across an Imitater and challenge it for a game of cards drawing.

$$$N$$$ stack of cards are on the table. The $$$i$$$th stack on the table contains $$$A_i$$$ cards. In each move:

- A player can draw one card from any stack on the table (if it's not empty).

- A player can draw one card from each of every stack on the table (if no stack is empty).

The winner is the one that drawn the last card on the table.

Of course, as a master in game theory, Lowie knows the optimal strategy to win this game. But Imitater has copied Lowie, so that both are having exactly the same intelligence and the same winning tactics in their mind.

So, given the state of the game, who would win, if Lowie gets to go first?

Input

First line: an integer $$$N$$$ ($$$1 \le N \le 1000$$$) - number of stacks.

Second line: $$$N$$$ integers: $$$A_1, A_2, ..., A_N$$$ ($$$1 \le A_i \le 1000$$$) - number of cards in each stacks.

Output

Output "lowie" if Lowie wins the game, or "imitater" if Imitater the Potato wins.

ExamplesInput
2
1 2
Output
lowie
Input
3
1 4 3
Output
imitater

加入题单

算法标签: