#include #define pt(sth) cout << sth << "\n" #define itr(x,c) for(auto x=c.begin();x!=c.end();x++) #define all(a) (a.begin()),(a.end()) using namespace std; #include using namespace atcoder; typedef long long ll; typedef pair pll; templatebool chmax(T &a, const T &b) {if(abool chmin(T &a, const T &b) {if(b a(N); //for(i=0;i>a[i]; typedef vector v1D; typedef vector v2D; typedef vector v3D; ll gcd(ll a,ll b){ if(b==0) return a; else return gcd(b,a%b); } int main(){ ll i,j; ll T;cin>>T; while(T--){ vector x(3); for(i=0;i<3;i++){ cin>>x[i].first; x[i].second=i; } sort(all(x)); ll lcm=x[1].first*x[2].first/gcd(x[1].first, x[2].first); x[1].first=x[2].first=lcm; sort(all(x),[](const pll& a,const pll& b){return a.second