# Stupid

We want to distinguish between stupid prices like 99 cents, 499.98 euros, etc. and normal prices. To measure the stupidity of a positive integer, do the following:

- Eliminate all trailing zeros, i.e., those in the least significant positions, from the number. You now have a positive integer, say 'x', with a non-zero digit 'd' at its end.
- Count the number of digits, say 'a', of the number x.
- if d=5 the stupidity of the number is 2 * a - 1
- otherwise, the stupidity of the number is 2 * a

For example, the stupidity of 350 is 3 and the stupidity of 900900 is 8. Using the measure of stupidity, we can define what we call an stupid price: A price c is stupid if and only if the closed interval [0.95 * c,1.05 * c] contains an integer e such that the stupidity of e is less than the stupidity of c. Given a price in cents, go ahead and tell whether it is stupid!

**Input**

The first line of the input consists of the number t of test cases to follow. Each test case is specified by one line containing an integer c. You may assume that 1 <= c <= 10^9.

1 <= t <= 100,000

**Output**

For each test case output if c is stupid or not. Adhere to the format shown in the sample output.

**Sample Input**

```
```

4

99

49998

90000

970000000

**Sample Output**

```
```

stupid

stupid

not stupid

stupid

*Problem Setter: Rounak Tibrewal*

**Languages:**C,C++,C#,Java,JavaScript,Pascal,Perl,PHP,Python,Ruby,Text