from math import gcd def lcm(x,y): return (x*y)//gcd(x,y) for _ in range(int(input())): a, b, c = map(int, input().split()) t = [a, b, c] t.sort() a = t[0] b = t[1] c = t[2] g = 1 g = lcm(a,b) g1 = g g = lcm(g,c) print(a,g1,g)