#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define rep(i,n) for(int i=0;i<(n);i++) #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define sz(x) ((int)(x).size()) #define pb push_back using ll = long long; using namespace std; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b> X >> Y; if(win(X,Y)) cout << "First" << endl; else{ cout << "Second" << endl; char op; cin >> op; if(op=='C' || op=='D') return 0; if(op=='B'){ X=0;Y=0; } else{ int i; ll x; cin >> i >> x; if(i==1) X-=x; else Y-=x; } } while(1){ if(X==Y){ cout << 'B' << endl; } else{ if(X==0){ cout << "A 2 " << Y << endl; } else if(Y==0){ cout << "A 1 " << X << endl; } else{ if(X>Y){ ll x = (Y%2==0)?Y-1:Y+1; cout << "A 1 " << X-x << endl; } else{ ll y = (X%2==0)?X-1:X+1; cout << "A 2 " << Y-y << endl; } } } char op; cin >> op; if(op=='C' || op=='D') break; if(op=='B'){ X=0;Y=0; } else{ int i; ll x; cin >> i >> x; if(i==1) X-=x; else Y-=x; } } return 0; }