import sys input = sys.stdin.readline T=int(input()) for tests in range(T): A,B,C=map(int,input().split()) A*=123 B*=456 C*=7890000 A=A*(C//A) B=B*(C//B) print(A,B,C)