from collections import defaultdict, deque, Counter from heapq import heapify, heappop, heappush import sys import math import random import string from copy import deepcopy from itertools import combinations, permutations, product from bisect import bisect_left, bisect_right def input(): return sys.stdin.readline().rstrip() def getN(): return int(input()) def getNM(): return map(int, input().split()) def getList(): return list(map(int, input().split())) def getArray(intn): return [int(input()) for i in range(intn)] sys.setrecursionlimit(1000000000) mod = 10 ** 9 + 7 INF = float('inf') dx = [1, 0, -1, 0] dy = [0, 1, 0, -1] ############# # Main Code # ############# """ sum(a, b, c) > 2 * max(a, b, c) A, B, Cのmaxの元を照準にすると楽だが Cを一番大きい整数とする """ prim = [7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101] T = getN() for _ in range(T): A, B, C = getNM() P = deepcopy(prim) # 互いに割り切れないようにする A *= 2 B *= 3 C *= 5 while A >= B: B *= P.pop() while B >= C: C *= P.pop() print(((C - 1) // A) * A, ((C - 1) // B) * B, C)