Simple Game#196

Simple Game

1 segundo
64 megabytes
Fácil (≈1000)

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.

Entrada

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 ).

Salida

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

Ejemplos

Ejemplo 1

Loading
Loading