#include "combo.h"
std::string guess_sequence(int N) {
// int coins = press(p);
std::string S = "";
bool A = true, B = true, X = true, Y = true;
for (int i = 0; i < N; ++i) {
if (A) {
int a = press(S + "A");
if (a - S.size() == 1) {
S += "A";
if (i == 0) {
A = false;
}
continue;
}
}
if (B) {
int b = press(S + "B");
if (b - S.size() == 1) {
S += "B";
if (i == 0) {
B = false;
}
continue;
}
}
if (X) {
int x = press(S + "X");
if (x - S.size() == 1) {
S += "X";
if (i == 0) {
X = false;
}
continue;
}
}
if (Y) {
int y = press(S + "Y");
if (y - S.size() == 1) {
S += "Y";
if (i == 0) {
Y = false;
}
continue;
}
}
}
// cout << S << endl;
return S;
}