Question
Digit Dodge
Kael holds an array of digits E of size L, each digit being one he dislikes. Given an integer M, find the smallest integer Y that is at least M and, in its decimal form, contains none of the digits from E.
Input
The first line of the input contains two integers M and L.
The second line of the input contains L space separated digits.
The second line of the input contains L space separated digits.
Output
Print the suitable integer Y. If no such integer exists, print -1.
Example
Sample Input
101 5
0 1 2 3 4
Sample Output
555
101 5
0 1 2 3 4
Sample Output
555