import math #最大公約数 def lcm(x, y): return (x * y) // math.gcd(x, y) T=int(input()) for i in range(T): A,B,C = map(int, input().split()) lc = lcm(lcm(A,B),C) print(lc,lc,lc)