Write a program to find the smallest positive integer that consists only of the given digits and is divisible by the specified integer .
The first line contains the integer (1 < N < 5000). The second line contains from to distinct digits that can be used to construct the number .
Print the found integer on the first line, or print if no such number exists.
Example 1