def solve(A,b,c): #xa + b > c x = (c-b)//A+1 a = A*x return a,b,c T = int(input()) for _ in range(T): print(solve(*sorted(map(int,input().split()))))