#include #include #include using namespace std; using namespace atcoder; using mint = modint998244353; using ll=long long; bool chmin(ll& a, ll b){ if(a > b){ a = b; return 1; } return 0; } bool chmax(int& a, int b){ if(a < b){ a = b; return 1; } return 0; } constexpr ll TEN(int n) { return (n == 0) ? 1 : 10 * TEN(n - 1); } const ll MOD = 998244353LL; using pll = pair; const int INF = 1e7; vector sieve(int X) { vector cs(X+1, true); for (int i = 2; i*i <= X; ++i) { if (cs[i]) { for (int j = i*i; j <= X; j+=i) cs[j] = false; } } vector ans; for (int i = 2; i <= X; ++i) if (cs[i]) ans.push_back(i); return ans; } ll gcd(ll a, ll b) { if (b==0) return a; return gcd(b, a%b); } int main() { int T; cin >> T; vector xs(3); vector ans(T, vector(3)); for (int i = 0; i < T; ++i) { cin >> xs[0] >> xs[1] >> xs[2]; sort(xs.begin(), xs.end()); ll a = xs[0], b = xs[1], c = xs[2]; int j = 2; while (xs[0] + xs[1] <= xs[2]) { xs[2] = c*j; xs[1] = ((xs[2]-1)/b)*b; xs[0] = ((xs[1]-1)/c)*c; j++; } ans[i][0] = xs[0]; ans[i][1] = xs[1]; ans[i][2] = xs[2]; } for (auto v : ans) { cout << v[0] << " "; cout << v[1] << " "; cout << v[2] << endl; } return 0; }