time limit per test : 1 second
memory limit per test : 256 megabytes
input : standard input
output : standard output
You are given an integer
Find the smallest integer
The choice of the dropped digit (the digit of
Input
Each test contains multiple test cases. The first line contains the number of test cases
The only line of each test case contains a single integer
Output
For each test case, output a single integer
If no such integer "NULL"
.
Example
input:
3
2
1562401
-1668
output:
NULL
101245
-866