#include using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); set> st; int n = 26; rep(i, n) rep(j, n) { st.insert({i, j}); } rep(i, n) { rep(j, n) { if (j == 1) continue; if (!st.contains({i, (i + j) % 26})) continue; int cur = i; while (true) { int nx = (cur + j) % n; cout << char(cur + 'A'); cout << char(nx + 'A') << endl; st.erase({cur, nx}); cur = nx; if (nx == i) break; } } cout << char(i + 'A'); cout << char((i + 1) % n + 'A') << endl; } return 0; }