#include <bits/stdc++.h>
using namespace std;

#define int long long
#define fi first
#define se second
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define rep1(i,n) for(int i=1;i<=(int)(n);++i)
#define rep11(i,n) for(int i=1;i<(int)(n);++i)
#define repo(i,o,n) for(int i=o;i<(int)(n);++i)
#define repm(i,n) for(int i=(int)(n)-1;i>=0;--i)
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define pb(n) push_back(n)
#define mp make_pair
#define MOD 1000000007
#define INF LONG_LONG_MAX



int n;
string s3[3] = {
        "..a",
        "..a",
        "bb."
},s4[4] = {
        "aacd",
        "bbcd",
        "efgg",
        "efhh"
},s5[5] = {
        "abcc.",
        "ab.dd",
        "eefgg",
        "h.f.i",
        "hjj.i"
},s7[7] = {
       "ab..e..",
       "ab..e..",
       "cc..kkl",
       "..aac.l",
       "kkbbc..",
       "..de.ff",
       "..de.gg"
};

signed main() {
    cin >> n;
    if (n%3 == 0) {
        rep(i,n) {
            rep(j,n) {
                if (i/3*3 <= j && j < i/3*3+3) {
                    cout << s3[i%3][j%3];
                } else cout << ".";
            }
            cout << endl;
        }
    } else if (n%4 == 0) {
        rep(i,n) {
            rep(j,n) {
                if (i/4*4 <= j && j < i/4*4+4) {
                    cout << s4[i%4][j%4];
                } else cout << ".";
            }
            cout << endl;
        }
    } else if (n%5 == 0) {
        rep(i,n) {
            rep(j,n) {
                if (i/5*5 <= j && j < i/5*5+5) {
                    cout << s5[i%5][j%5];
                } else cout << ".";
            }
            cout << endl;
        }
    } else if (n%7 == 0) {
        rep(i,n) {
            rep(j,n) {
                if (i/7*7 <= j && j < i/7*7+7) {
                    cout << s7[i%7][j%7];
                } else cout << ".";
            }
            cout << endl;
        }
    }
    else {
        bool f = true;
        rep(k,n) {
            if (k*7 > n) {
                cout << -1 << endl;
                return 0;
            }
            rep(K,n) {
                if (k*7+K*5 > n) break;
                if ((n-k*7-K*5)%4 == 0) {
                    rep(i,k*7) {
                        rep(j,n) {
                            if (i/7*7 <= j && j < i/7*7+7) {
                                cout << s7[i%7][j%7];
                            } else cout << ".";
                        }
                        cout << endl;
                    }
                    rep(i,K*5) {
                        rep(j,k*7) cout << ".";
                        rep(j,n-k*7) {
                            if (i/5*5 <= j && j < i/5*5+5) {
                                cout << s5[i%5][j%5];
                            } else cout << ".";
                        }
                        cout << endl;
                    }
                    rep(i,n-k*7-K*5) {
                        rep(j,k*7+K*5) cout << ".";
                        rep(j,n-k*7-K*5) {
                            if (i/4*4 <= j && j < i/4*4+4) {
                                cout << s4[i%4][j%4];
                            } else cout << ".";
                        }
                        cout << endl;
                    }
                    return 0;
                }
            }
        }
    }
}


Measured memory_bytes: 1280