#include<iostream>
#include<fstream>
#include<cstdlib>
#include<iomanip>
#include<set>
#include<map>
#include<algorithm>
#include<vector>
#include<cstdio>
#include<queue>
#include<stack>
#include<cmath>
#define ll long long
#define pb push_back
#define ld long double
#define mp make_pair
#define pii pair<int, int>
using namespace std;

string R2(string w) {
    string ans = "A";
    for (int i = 1; i < w.size(); ++i)
        if (w[i] == w[i - 1])
            ans += "B";
        else 
            ans += "A";
    return ans;
}

string R1(string w) {
    if (w[(int)w.size() - 1] == 'A') w[(int)w.size() - 1] = 'B';
    else
        w[(int)w.size() - 1] = 'A';
    return w;
}

int mpow;
int strtobin(string s) {
    int a = 0;
    for (int i = 0; i < s.size(); ++i) {
        if (s[(int)s.size() - i - 1] == '1') {
            a = a ^ (1 << i);
            mpow = i;
        }
    }
    return a;
}
string s;
int getl(string st) {
    int a = 1;
    s = R2(st);
    while (st != s) {
        if (R1(s) != st) {
            s = R1(s);
            cout << a << endl;
            a++;
        }
        s = R2(s);
        a++;
    }
    return a;
}


void solve(int x) {
    if (x % 2 == 1) {
        cout << "NO" << endl;
        return;
    }
    int nxt = 1;
    int nn;
    for (nn = 2; nn * 2 - 2 < x; nn *= 2);
    for (int i = 0; i < nn / 2 + 2; ++i)
        printf("A");
    printf("\n");
    int cnt = 0;
    int c = x - nn;
    for (int i = 0; i < nn; ++i) {
        printf("2");
        cnt++;
        if ((c > 0) && (cnt == nxt)) {
            c--;
            printf("1");
            nxt += 2;
            cnt++;
            if (cnt == nn - 1) cnt++;
        }
    }
}

int main(void) {
    int n;
    cin >> n;
    if (n == 2) {
        cout << "AA" << endl;
        cout << "11" << endl;
        return 0;
    }
    solve(n);
    //return 0;
    /*string s = "A";
    string x;
    for (int i = 0; i < 130; ++i)
        s += "A";
    for (int i = 0; i < 200; ++i) {
        s += "A";
        cout << s.length() << " " << getl(s) << endl;
        cin >>  x;
    }*/
    return 0;
}
