// Starcraft 2 enjoyer //
#include <bits/stdc++.h>
#include "combo.h"
// #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")
using namespace std;
#define LSOne(X) ((X) & -(X))
const int N = 1e5 + 5;
const int M = 1e6 + 5;
const int LG = 60;
const int INF = 1e9 + 5;
const int K = 301;
const int B = 150000;
const int MOD = 1e9 + 7;
const char type[4] = {'A', 'B', 'X', 'Y'};
string guess_sequence(int n)
{
string cur = "";
for (int x = 0; x < 4; x++)
{
cur += type[x];
int i = press(cur);
if (i == 1)
{
break;
}
cur = "";
}
for (int x = 1; x < n; x++)
{
for (int y = 0; y < 4; y++)
{
if (type[y] == cur[0])
continue;
cur += type[y];
int i = press(cur);
if (i == x + 1)
{
break;
}
cur.pop_back();
}
}
return cur;
}