Simple Game#196

Simple Game

1 second
64 megabytes
Easy

Tolia and Serhiyko take turns playing a mathematical game with a set of natural numbers. On each turn, a player must decrease any one of these numbers by a prime number so that the result is still a natural number. The player who cannot make a move loses. Both players play optimally. If Tolia moves first, determine whether he can guarantee victory in each test case.

Input

The first line contains the number of test cases (1 \leq K \leq 10). Each of the following lines contains a sequence of natural numbers (at most numbers per line, none greater than ).

Output

Output a single line containing digits (without spaces) — for each test, output if Tolia has a winning strategy, otherwise output .

Examples

Example 1

Loading
Loading