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

Задача 38383. Exam preparation


Задача

Темы:
Among the open bank of USE problems in mathematics there is the following: given natural numbers l, r and m, you are asked to find integers a, b and c, each of which is not less than l and not more than r, and such that there will be a natural a number n (an integer greater than zero) such that
n · a + b − c = m.
Pasha has just started preparing for the Unified State Examination and does not quite understand how to solve such a problem. Help him find suitable a, b and c for different variants of this problem.

Input data format
The single line contains three integers l, r and m (1 ≤ l ≤ r ≤ 500 000, 1 ≤ m ≤ 1010).

Output data format
Print three integers a, b and c such that l ≤ a, b, c≤ r and there exists a natural number  n such that n · a + b − c = m. It is guaranteed that such numbers exist. If there are several suitable solutions, print any of them.
 
Examples
# Input Output
1 4 6 13 4 6 5
2 2 3 1 2 2 3

Remark
In the first example, you can choose n = 3, then n · 4 + 6 − 5 = 13 = m. The following answers are also possible: a = 4, b = 5, c = 4 (with n = 3); a = 5, b = 4, c = 6 (with n = 3); a = 6, b = 6, c = 5  (with n = 2); a = 6, b = 5, c = 4 (with n = 2).
In the second example n = 1, then n · 2 + 2 .minus; 3 = 1 = m. The number n = 0 could not be chosen, since the number n must be natural.