Let's define a number as a K-digit number if it contains no more than distinct digits in its decimal representation, ignoring any leading zeros.
Given a number , your task is to find the nearest K-digit number to it.
The input consists of a single line with two integers, and , both without leading zeros (1 \leq K \leq 10, 0 \leq x \leq 10^8).
Output a K-digit number such that the absolute difference |y-x| is minimized. If there are multiple such numbers, you may output any one of them.
Example 1