Tiger's Lucky Number#1054

Tiger's Lucky Number

1 segundo
64 megabytes
Muy fácil (≈850)

During a rest near the lake, Tiger enjoys writing numbers on the sand. Then, for each number, he finds the sum of the squares of its digits. With the resulting number, he repeats the same operation. If, during these calculations, Tiger obtains the number , he calls such numbers "happy"; all others are called "unhappy".

Entrada

The first line contains the integer (1 \leq N \leq 10^5) — the number of written numbers. The second line contains numbers separated by spaces; each is not less than and does not exceed 2^{63}.

Salida

Output in one line digits: or without spaces, where represents an "unhappy" number and a "happy" number.

Ejemplos

Ejemplo 1

Loading
Loading