Given an integer $$$x$$$. Find the smallest integer $$$y$$$ that satisfy the following:
Here, $$$string(x)$$$ is the decimal representation of $$$x$$$ (without leading zeros) as a string.
Strings are compared lexicographically$$$^\dagger$$$. For example,
If such an integer $$$y$$$ does not exist, print $$$-1$$$.
$$$^\dagger$$$ A string $$$s$$$ is lexicographically larger than a string $$$t$$$ if and only if one of the following holds:
Each test consists of multiple test cases. The first line contains a single integer $$$t$$$ $$$(1 \le t \le 10^3)$$$ — the number of test cases. The description of the test cases follows.
The first and only line of each test case contains a single integer $$$x$$$ $$$(1 \le x \le 10^{18})$$$.
For each test case:
1 9
10
| Name |
|---|


