### 1635 - Sum of Digits I

 Created by Timus Online Judge - Leonid Volkov Added by ymondelo20 (2011-11-26) Limits Total Time: 2000 MS |Memory: 62 MB | Output: 64 MB | Size: 29 KB Total Time: 6000 MS |Memory: 3 GB | Output: 64 MB | Size: 29 KB Total Time: 4000 MS |Memory: 1 GB | Output: 64 MB | Size: 29 KB Total Time: 2000 MS |Memory: 62 MB | Output: 64 MB | Size: 29 KB Total Time: 12000 MS |Memory: 125 MB | Output: 64 MB | Size: 29 KB Total Time: 6000 MS |Memory: 62 MB | Output: 64 MB | Size: 29 KB Total Time: 2000 MS |Memory: 62 MB | Output: 64 MB | Size: 29 KB Total Time: 2000 MS |Memory: 62 MB | Output: 64 MB | Size: 29 KB Total Time: 12000 MS |Memory: 312 MB | Output: 64 MB | Size: 29 KB Total Time: 6000 MS |Memory: 125 MB | Output: 64 MB | Size: 29 KB Total Time: 6000 MS |Memory: 62 MB | Output: 64 MB | Size: 29 KB Total Time: 6000 MS |Memory: 62 MB | Output: 64 MB | Size: 29 KB Total Time: 6000 MS |Memory: 1 GB | Output: 64 MB | Size: 29 KB Total Time: 12000 MS |Memory: 937 MB | Output: 64 MB | Size: 29 KB Enabled languages C C# C++ Java Pascal Python Available in #### Description

Petka thought of a positive integer n and reported to Chapaev the sum of its digits and the sum of its squared digits. Chapaev scratched his head and said: "Well, Petka, I won't find just your number, but I can find the smallest fitting number." Can you do the same?
Petka thought of a positive integer n and reported to Chapaev the sum of its digits and the sum of its squared digits. Chapaev scratched his head and said: "Well, Petka, I won't find just your number, but I can find the smallest fitting number." Can you do the same?
Petka thought of a positive integer n and reported to Chapaev the sum of its digits and the sum of its squared digits. Chapaev scratched his head and said: "Well, Petka, I won't find just your number, but I can find the smallest fitting number." Can you do the same?

#### Input specification

The first line contains the number of test cases t (no more than 10000). In each of the following t lines there are numbers s1 and s2 (1 <= s1, s2 <= 10000) separated by a space. They are the sum of digits and the sum of squared digits of the number n.
The first line contains the number of test cases t (no more than 10000). In each of the following t lines there are numbers s1 and s2 (1 <= s1, s2 <= 10000) separated by a space. They are the sum of digits and the sum of squared digits of the number n.
The first line contains the number of test cases t (no more than 10000). In each of the following t lines there are numbers s1 and s2 (1 <= s1, s2 <= 10000) separated by a space. They are the sum of digits and the sum of squared digits of the number n.

#### Output specification

For each test case, output in a separate line the smallest fitting number n, or "No solution" if there is no such number or if it contains more than 100 digits.
For each test case, output in a separate line the smallest fitting number n, or "No solution" if there is no such number or if it contains more than 100 digits.
The first line contains the number of test cases t (no more than 10000). In each of the following t lines there are numbers s1 and s2 (1 <= s1, s2 <= 10000) separated by a space. They are the sum of digits and the sum of squared digits of the number n.

#### Sample input

`49 8112 96 107 9`

#### Sample output

`9No solution1122111112`

#### Hint(s)

http://coj.uci.cu/contest/
http://coj.uci.cu/contest/
http://coj.uci.cu/contest/