k, p, t = map(int, input().split())while k <= p: k += 1 if k % 10 == t: print(k, end=' ')
10 39 7
17 27 37
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!