#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include ///////// #define REP(i, x, n) for(int i = x; i < n; i++) #define rep(i,n) REP(i,0,n) #define P(p) cout<<(p)< ///////// typedef long long LL; typedef long double LD; ///////// using namespace::std; ///////// vector hist(500); int N,n; void solve(){ cin >> N; queue q; PII temp; for(int i=1;i use(N,false); vector IN( N ); vector::iterator it,endit; int loop = 0; int cnt = 0; use = vector(N,false); string str; while( !q.empty() ){ temp = q.front(); q.pop(); if( !use[temp.first-1] && !use[temp.second-1] ){ IN[cnt] = temp; ++cnt; use[temp.first-1] = true; use[temp.second-1] = true; }else{ q.push( temp ); } ++loop; if( loop >= (N)*(N-1)/2 || cnt >= N/2 ){ it = IN.begin(); endit = IN.end(); cnt = 0; cout << "?"; for( ;it != endit;++it ){ cout << " " << it->first << " " << it->second; ++cnt; } for(int k= cnt;k> str; if( IN[i].first == 0 || IN[i].second == 0)continue; if( str == "<" ){ ++hist[ IN[i].second-1 ]; }else{ ++hist[ IN[i].first-1 ]; } } for(int k=cnt;k> str; } ///////////// loop = 0; cnt = 0; use = vector(N,false); temp.first = 0; temp.second = 0; IN = vector(N,temp); } } vector ret(N,0); for(int i=0;i