Given different digits between 1 and 9, find all the multiples of 7 that can be formed with the digits.
Input consists of a number , followed by different digits between 1 and 9.
Print all the multiples of 7 that can be formed with the digits. If there is none, print a hyphen.
You can print the solutions to this exercise in any order.
Input
4 3 5 2 8
Output
3528 2583 2835 8253
Input
3 2 5 7
Output
-