A number is called a -digit number if the number of distinct digits in its decimal representation (ignoring leading zeros) does not exceed .
Given a number , find the -digit number closest to .
The input consists of a single line containing two integers and without leading zeros (1 \leq K \leq 10, 0 \leq x \leq 10^6).
Output a -digit number such that |y-x| is minimized. If there are multiple such numbers, you may output any of them.
Example 1