Олимпиадный тренинг

Задача 33684. Wonderful Numbers 6


Задача

Темы: Цикл for

Given non-negative integers a, b, c, d, with (0 <= c <= d)  ;. Print in ascending order all the numbers from a to inclusive, which give a remainder c when divided by  ;d.

Input
Four integers  a, b, c, d are entered. Each number on a new line.

Imprint 
Output the answer to the problem. Output the numbers on one line, separated by one space. If there are no such numbers in the specified range, then nothing should be displayed.
 
Examples
# Input Output
1 2
5
0
2
2 4