// solution for yukicoder_5395 // author : lynmisakura #include using namespace std; using ll = long long; #define REP(i,N) for(int i=0;i a[3]; void main2(){ REP(i,3) cin >> in[i] , a[i].first = in[i], a[i].second = i; sort(a,a+3); while(a[0].first + in[a[0].second] <= a[2].first){ a[0].first += in[a[0].second]; } while(a[1].first + in[a[1].second] <= a[2].first){ a[1].first += in[a[1].second]; } REP(i,3)REP(j,3) if(a[j].second == i)cout << a[j].first << (i < 2 ? ' ': '\n'); } int main(void){ int t;cin >> t; while(t--) main2(); }