#include using namespace std; typedef long long ll; typedef long double ld; #define REP(i, n) for (int i = 0; i < (n); ++i) #define REPR(i, n) for (int i = n - 1; i >= 0; --i) #define FOR(i, m, n) for (int i = m; i < n; ++i) #define FORR(i, m, n) for (int i = m; i >= n; --i) #define ALL(v) (v).begin(),(v).end() templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b> T; while(T--){ vector> x(3); REP(i,3){ cin >> x[i].first; x[i].second=i; } sort(ALL(x)); REP(i,3){ ll p=x[2].first/x[i].first*x[i].first; x[i].first=p; swap(x[i].first,x[i].second); } sort(ALL(x)); cout << x[0].second << " " << x[1].second << " " << x[2].second << endl; } }