#P1379B. Dubious Cyrpto

    ID: 3115 Type: RemoteJudge 1000ms 512MiB Tried: 0 Accepted: 0 Difficulty: 5 Uploaded By: Tags>binary searchbrute forcemathnumber theory*1500

Dubious Cyrpto

Description

Pasha loves to send strictly positive integers to his friends. Pasha cares about security, therefore when he wants to send an integer nn, he encrypts it in the following way: he picks three integers aa, bb and cc such that la,b,crl \leq a,b,c \leq r, and then he computes the encrypted value m=na+bcm = n \cdot a + b - c.

Unfortunately, an adversary intercepted the values ll, rr and mm. Is it possible to recover the original values of aa, bb and cc from this information? More formally, you are asked to find any values of aa, bb and cc such that

  • aa, bb and cc are integers,
  • la,b,crl \leq a, b, c \leq r,
  • there exists a strictly positive integer nn, such that na+bc=mn \cdot a + b - c = m.

The first line contains the only integer tt (1t201 \leq t \leq 20) — the number of test cases. The following tt lines describe one test case each.

Each test case consists of three integers ll, rr and mm (1lr5000001 \leq l \leq r \leq 500\,000, 1m10101 \leq m \leq 10^{10}). The numbers are such that the answer to the problem exists.

For each test case output three integers aa, bb and cc such that, la,b,crl \leq a, b, c \leq r and there exists a strictly positive integer nn such that na+bc=mn \cdot a + b - c = m. It is guaranteed that there is at least one possible solution, and you can output any possible combination if there are multiple solutions.

Input

The first line contains the only integer tt (1t201 \leq t \leq 20) — the number of test cases. The following tt lines describe one test case each.

Each test case consists of three integers ll, rr and mm (1lr5000001 \leq l \leq r \leq 500\,000, 1m10101 \leq m \leq 10^{10}). The numbers are such that the answer to the problem exists.

Output

For each test case output three integers aa, bb and cc such that, la,b,crl \leq a, b, c \leq r and there exists a strictly positive integer nn such that na+bc=mn \cdot a + b - c = m. It is guaranteed that there is at least one possible solution, and you can output any possible combination if there are multiple solutions.

Sample Input 1

2
4 6 13
2 3 1

Sample Output 1

4 6 5
2 2 3

Note

In the first example n=3n = 3 is possible, then n4+65=13=mn \cdot 4 + 6 - 5 = 13 = m. Other possible solutions include: a=4a = 4, b=5b = 5, c=4c = 4 (when n=3n = 3); a=5a = 5, b=4b = 4, c=6c = 6 (when n=3n = 3); a=6a = 6, b=6b = 6, c=5c = 5 (when n=2n = 2); a=6a = 6, b=5b = 5, c=4c = 4 (when n=2n = 2).

In the second example the only possible case is n=1n = 1: in this case n2+23=1=mn \cdot 2 + 2 - 3 = 1 = m. Note that, n=0n = 0 is not possible, since in that case nn is not a strictly positive integer.