After mastering version control systems, the dedicated PE teacher at LCS developed a strong desire to preserve all his uniquely styled tables and diagrams for future use. Concerned about competitors stealing his work and distrustful of existing cryptosystems, he devised a brand-new encryption algorithm by the end of the session. However, the algorithm relies on the function for a given natural number : is defined as the smallest natural number that is divisible by and whose digits sum up to . Unfortunately, the PE teacher struggles to compute this function for n > 9, and he earnestly seeks your assistance to calculate it for values 1 \le n \le 1000.
We can't leave him to tackle this daunting challenge alone! Let's help the PE teacher!
The input file contains a single natural number (1 \le n \le 1000).
The output file should contain the natural number if such a number exists, or the string No solution if it does not.
Example 1