L = 10 ** 18 def main(): a, b, c = map(int, input().split()) x = (L // a) * a y = (L // b) * b z = (L // c) * c print(x, y, z) T = int(input()) for _ in range(T): main()