High School Programming League 2008/2009

Lonely Numbers

Problem code: HS08LN

Numbers which live on the Planet of Math are very friendly and eager to support other numbers. Each number has one special number, which it supports, chosen as follows. It counts the number of ones in its own binary representation, and adds this count to itself to obtain the value of the number it supports. That is, if j(m) means the number of ones in the binary representation of m, then m supports m+j(m). For example, the number eight (1000 in binary) supports nine, whereas nine supports eleven.

However, in this way not all the numbers get supported; some are left without support, and we call these numbers lonely. For example since one supports two, two supports three and three supports five, there is no number less than four, which would support four, so four is lonely.

Your task is for a given number recognize if it is lonely or supported by some number.

Input

The first line of each test one integer t, 1<= t <= 100, meaning how many numbers are to be checked. In each of the following t lines, one integer n, 1 <= n <= 1000000000 .

Output

For every checked number n write one line containing the word LONELY if n is lonely or the word SUPPORTED if given n there exists m such that n=m+j(m).

Example

Input:
3
4
9
11

Output:
LONELY
SUPPORTED
SUPPORTED

Scoring

There will be 10 tests. Each test will be worth one point.


Added by:Adam Dzedzej
Date:2009-01-10
Time limit:1s
Source limit:50000B
Languages:SED C99 strict C++ 4.0.0-8 C++ 4.3.2 TCL SCALA NEM PHP SCM guile LISP sbcl LISP clisp ERL TECS TEXT DOC PDF PS PERL 6 JS
Resource:High School Programming League
SPOJ System © 2008-2009 Sphere Research Labs. All Rights Reserved.