#include using namespace std; using Pi = pair; Pi printQ(int x, int y) { if (x == y) { cout << "B" << endl; return Pi{0, 0}; } int id = 1; if (x < y) { id ++; swap(x, y); } if (y == 0) { cout << "A " << id << " " << x << endl; return Pi{id, x}; } int d = x - y; if (y & 1) { d --; } else { d ++; } cout << "A " << id << " " << d << endl; return Pi{id, d}; } int main() { int X, Y; cin >> X >> Y; if (abs(X - Y) == 1 && (X + Y) & 3 == 3) { cout << "Second" << endl; } else { cout << "First" << endl; auto [id, d] = printQ(X, Y); ((id - 1) ? Y : X) -= d; } while (true) { char c; cin >> c; if (c == 'C') { return 0; } else if (c == 'D') { return 0; } else if (c == 'B') { return 0; } else { assert(c == 'A'); int id, d; cin >> id >> d; ((id - 1) ? Y : X) -= d; } auto [id, d] = printQ(X, Y); ((id - 1) ? Y : X) -= d; } }