#include <bits/stdc++.h>
using std::cerr;using std::cin;using std::cout;using std::abs;using std::min;using std::max;using std::swap;using std::map;using std::unordered_map;using std::unordered_set;using std::bitset;using std::pair;using std::set;using std::string;using std::vector;using std::sort;using ll=long long;using uint=unsigned int;using pii=pair<int,int>;using pll=pair<ll,ll>;using ull = unsigned long long;using ld=long double;template<typename T>void _(const char*s,T h){cerr<<s<<" = "<<h<<"\n";}template<typename T,typename...Ts>void _(const char*s,T h,Ts...t){int b=0;while(((b+=*s=='(')-=*s==')')!=0||*s!=',')cerr<<*s++;cerr<<" = "<<h<<",";_(s+1,t...);}// break continue pop_back 998244353
#define int ll
#define pii pll
#define f first
#define s second
#define pb emplace_back
#define forn(i,n) for(int i=0;i<(n);++i)
#define sqr(x) ((x)*(x))
struct init{init(){cin.tie(0);std::iostream::sync_with_stdio(0);cout<<std::fixed<<std::setprecision(10);cerr<<std::fixed<<std::setprecision(5);}~init(){
#ifdef LOCAL
#define dbg(...) _(#__VA_ARGS__,__VA_ARGS__)
cerr<<"Time elapsed: "<<(double)clock()/CLOCKS_PER_SEC<<"s.\n";
#else
#define dbg(...) 
#endif
}}init;template<typename T,typename U>void upx(T&x,U y){if(x<y)x=y;}template<typename T,typename U>void upn(T&x,U y){if(x>y)x=y;}

const int N=1111;
string ans[N];
void k4(int s){
    ans[s][s+0]='a';
    ans[s][s+1]='a';
    ans[s][s+2]='b';
    ans[s][s+3]='c';

    ans[s+1][s+0]='c';
    ans[s+1][s+1]='c';
    ans[s+1][s+2]='b';
    ans[s+1][s+3]='c';

    ans[s+2][s+0]='a';
    ans[s+2][s+1]='b';
    ans[s+2][s+2]='a';
    ans[s+2][s+3]='a';

    ans[s+3][s+0]='a';
    ans[s+3][s+1]='b';
    ans[s+3][s+2]='c';
    ans[s+3][s+3]='c';
}

void k5(int s){
    ans[s][s+0]='a';
    ans[s][s+1]='b';
    ans[s][s+2]='b';
    ans[s][s+3]='a';
    ans[s][s+4]='.';

    ans[s+1][s+0]='a';
    ans[s+1][s+1]='.';
    ans[s+1][s+2]='.';
    ans[s+1][s+3]='a';
    ans[s+1][s+4]='b';

    ans[s+2][s+0]='c';
    ans[s+2][s+1]='c';
    ans[s+2][s+2]='b';
    ans[s+2][s+3]='.';
    ans[s+2][s+4]='b';

    ans[s+3][s+0]='a';
    ans[s+3][s+1]='.';
    ans[s+3][s+2]='b';
    ans[s+3][s+3]='a';
    ans[s+3][s+4]='a';

    ans[s+4][s+0]='a';
    ans[s+4][s+1]='c';
    ans[s+4][s+2]='c';
    ans[s+4][s+3]='b';
    ans[s+4][s+4]='b';
}

int32_t main(){
    int n;
    cin>>n;
    if(n==2){
        cout<<"-1\n";
        return 0;
    }
    if(n==3){
        cout<<"aab\n";
        cout<<"b.b\n";
        cout<<"baa\n";
        return 0;
    }
    if(n==6){
        cout<<"aabb..\n";
        cout<<"b..zz.\n";
        cout<<"ba....\n";
        cout<<".a..aa\n";
        cout<<"..a..b\n";
        cout<<"..a..b\n";
        return 0;
    }
    if(n==7){
        cout<<"abbaa..\n";
        cout<<"a....bc\n";
        cout<<"b....bc\n";
        cout<<"b...cca\n";
        cout<<"aabb..a\n";
        cout<<".cca..c\n";
        cout<<"...abbc\n";
        return 0;
    }
    if(n==11){
        cout<<"abbaa......\n";
        cout<<"a....bc....\n";
        cout<<"b....bc....\n";
        cout<<"b...cca....\n";
        cout<<"aabb..a....\n";
        cout<<".cca..c....\n";
        cout<<"...abbc....\n";
        cout<<".......aabc\n";
        cout<<".......ccbc\n";
        cout<<".......abaa\n";
        cout<<".......abcc\n";
        return 0;
    }
    forn(i,n)ans[i].resize(n,'.');
    for(int c4=0;c4<n;++c4){
        int c5=(n-c4*4)/5;
        if(c5>=0&&c4*4+c5*5==n){
            int s=0;
            forn(i,c4){
                k4(s);
                s+=4;
            }
            forn(i,c5){
                k5(s);
                s+=5;
            }
            forn(i,n)cout<<ans[i]<<'\n';
            return 0;
        }
    }
    assert(0);


    return 0;
}


Measured memory_bytes: 2304