Your Game#7381

Your Game

1 second
64 megabytes
Easy

Petryk and Marichka are playing a turn-based mathematical game:

You start with several natural numbers. On each turn, a player must reduce one of these numbers by any power of two (1 2 4 8 16...), ensuring the result is non-negative. The player who cannot make a move loses. Your task is to determine Petryk's chances of winning if he goes first and both players use optimal strategies.

Input

The first line contains the number of test cases (up to ). Each of the following lines contains a sequence of natural numbers (up to numbers per line, each not exceeding ).

Output

Output a single line with digits, either or , representing the result for each test case. A indicates that Petryk has a winning strategy, while a means Marichka has the advantage. Write these digits consecutively without spaces.

Examples

Example 1

Loading
Loading