#include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <optional>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;

int main() {
    int32_t t;
    cin >> t;
    vector<tuple<int32_t, int32_t, int32_t>> xs(t);
    for (auto &&x : xs) {
        cin >> get<0>(x) >> get<1>(x) >> get<2>(x);
    }
    for (auto &&x : xs) {
        vector<int32_t> ys = {get<0>(x), get<1>(x), get<2>(x)};
        int32_t i = 0;
        if (ys[i] < ys[1])
            i = 1;
        if (ys[i] < ys[2])
            i = 2;
        for (auto j = 0; j < 3; ++j) {
            int64_t t;
            if (j == i)
                t = ys[j];
            else
                t = int64_t(ys[i] + ys[j] - 1) / ys[j] * ys[j];
            cout << (j == 0 ? "" : " ") << t;
        }
        cout << endl;
    }
    return 0;
}