#include <bits/stdc++.h>


using namespace std;

ifstream f1("taoxau.inp");
ofstream f2("taoxau.out");
int n,kt=0;
string s;
void kq()
{ int i;
    for ( i=0;i<n;i++)
    { f2<<s[i];}
    f2<<endl;
}

void xau(int i)
{ char j;
    for ( j=65;j<=66;j++)
    { 
		 if (j == 65 || (j==66 && s[i-1] != 66)) {s[i] = j;}
		 else break;
        if (i==n-1) { kq();}
        else {xau(i+1); } 
    }
}
int main()
{    
    s[-1] = 32;
    f1>>n;
    xau(0);

   return 0;
}
