#include "bits/stdc++.h" #define REP(i,n,N) for(int i=(n); i<(N); i++) #define RREP(i,n,N) for(int i=(N-1); i>=n; i--) #define CK(n,a,b) ((a)<=(n)&&(n)<(b)) #define ALL(v) (v).begin(),(v).end() #define p(s) cout<<(s)<> typedef long long ll; using namespace std; const int inf=1e9+7; vector vt; int a,b; int main() { REP(i,0,10){ cout<>a>>b; if(a==1) vt.push_back(i); } do{ cout<>a>>b; if(a==4) break; }while(next_permutation(ALL(vt))); return 0; }