#include using namespace std; //* ATCODER #include using namespace atcoder; typedef modint998244353 mint; //*/ /* BOOST MULTIPRECISION #include using namespace boost::multiprecision; //*/ typedef long long ll; #define rep(i, s, n) for (int i = (int)(s); i < (int)(n); i++) #define rrep(i, s, n) for (int i = (int)(n)-1; i >= (int)(s); i--) template bool chmin(T &a, const T &b) { if (a <= b) return false; a = b; return true; } template bool chmax(T &a, const T &b) { if (a >= b) return false; a = b; return true; } template T max(vector &a){ assert(!a.empty()); T ret = a[0]; for (int i=0; i<(int)a.size(); i++) chmax(ret, a[i]); return ret; } template T min(vector &a){ assert(!a.empty()); T ret = a[0]; for (int i=0; i<(int)a.size(); i++) chmin(ret, a[i]); return ret; } template T sum(vector &a){ T ret = 0; for (int i=0; i<(int)a.size(); i++) ret += a[i]; return ret; } int main(){ int x, y; cin >> x >> y; int now = 0; if (x % 2 == 0 && y % 2 == 1){ if (x - 1 == y){ now = 1; } } if (x % 2 == 1 && y % 2 == 0){ if (y - 1 == x){ now = 1; } } if (now == 0){ cout << "First" << endl; }else{ cout << "Second" << endl; } auto lft = [&](int x, int y){ if (y % 2 == 0){ return y - 1; }else{ return y + 1; } }; auto rgt = [&](int x, int y){ return lft(y, x); }; while(true){ if (now == 0){ if (x == y){ cout << "B" << endl; x = 0; y = 0; }else if(x == 0){ cout << "A 2 " << y << endl; y = 0; }else if(y == 0){ cout << "A 1 " << x << endl; x = 0; }else{ int v = lft(x, y); int w = rgt(x, y); if (v < x){ cout << "A 1 " << x - v << endl; x -= x - v; }else{ assert(w < y); cout << "A 2 " << y - w << endl; y -= y - w; } } }else{ char c; cin >> c; assert(c != 'D'); if (c == 'C'){ break; } if (c == 'A'){ int k; cin >> k; int r; cin >> r; if (k == 1){ x -= r; }else{ assert(k == 2); y -= r; } }else{ x = 0; y = 0; } } now ^= 1; } }