n = 10 ** 9 def solve(): a, b, c = map(int, input().split()) x = n // a * a y = n // b * b z = n // c * c print(x, y, z) for _ in range(int(input())): solve()