#include using namespace std; using ll=long long; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int N; cin>>N; if(N<=2){ cout<<-1<<"\n"; return 0; } vector S(2*N,string(2*N,'A')); ll F=(N*N*2); for(int j=2*N-2;j>=0;j--){ for(int i=2*N-1;i>0;i--){ if(F>0){ S[i][j]='B'; F--; if(F==0){ S[i-1][j]='B'; S[2*N-1][j]='A'; F=-1; } } } } for(int i=0;i<2*N;i++)cout<