e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Competitions

Week 3: November 23 – 29. For Loop. Part 2

Numbers with different digits

Print all four digit numbers from a to b with different digits.

Input

Two integers a and b (1000ab9999).

Output

Print in one line all numbers from a to b with different digits.

Time limit 1 second
Memory limit 128 MiB
Input example #1
2000 2015
Output example #1
2013 2014 2015 
Input example #2
9875 9999
Output example #2
9875 9876