#include "bits/stdc++.h" using namespace std; #define REP(i, n) for (int i = 0; i < n; i++) #define REPR(i, n) for (int i = n; i >= 0; i--) #define FOR(i, m, n) for (ll i = m; i < n; i++) #define FORR(i, m, n) for (ll i = m; i >= n; i--) #define REPO(i, n) for (ll i = 1; i <= n; i++) #define ll long long #define INF (ll)1ll << 60 #define MINF (-1 * INF) #define ALL(n) n.begin(), n.end() #define MOD (ll)1000000007 #define P pair P next(ll x, ll y){ if(x == y and x > 0) return P(0, 0); if(x + 1 == y and y % 2 == 0) return P(-1, -1); if(y + 1 == x and x % 2 == 0) return P(-1, -1); if(x < y){ if(x == 0) return P(2, y); else if(x % 2 == 1) return P(2, y - (x + 1)); else return P(2, y - (x - 1)); } if(x > y){ if(y == 0) return P(1, x); else if(y % 2 == 1) return P(1, x - (y + 1)); else return P(1, x - (y - 1)); } return P(-1, -1); } int main(){ ll x, y; cin >> x >> y; P jd = next(x, y); if(jd == P(-1, -1)){ cout << "Second" << endl; char c; ll a, b; cin >> c >> a >> b; if(a == 1)x -= b; else y -= b; } else cout << "First" << endl; while(1){ P ne = next(x, y); if(ne == P(0, 0)){ x = y = 0; cout << 'B' << endl; } else if(ne.first == 1){ x -= ne.second; cout <<"A 1 " << ne.second << endl; } else { y -= ne.second; cout << "A 2 " << ne.second << endl; } char c; ll a, b; cin >> c; if(c == 'C' or c == 'D')break; else if(c == 'B') x = y = 0; else { cin >> a >> b; if(a == 1)x -= b; else y -= b; } } }