#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <set>
#include <map>
#include <queue>
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <ctime>
#include <cstring>
#include <cctype>
#include <cassert>
#include <limits>
#include <functional>
#include <complex>
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define rer(i,l,u) for(int (i)=(int)(l);(i)<=(int)(u);++(i))
#define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i))
#if defined(_MSC_VER) || __cplusplus > 199711L
#define aut(r,v) auto r = (v)
#else
#define aut(r,v) __typeof(v) r = (v)
#endif
#define each(it,o) for(aut(it, (o).begin()); it != (o).end(); ++ it)
#define all(o) (o).begin(), (o).end()
#define pb(x) push_back(x)
#define mp(x,y) make_pair((x),(y))
#define mset(m,v) memset(m,v,sizeof(m))
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3fLL-1
double EPS=1e-9;
using namespace std;
typedef vector<int> vi; typedef pair<int, int> pii; typedef vector<pair<int, int> > vpii; typedef long long ll;
typedef complex<double> P;
typedef pair<int, ll> pill;
template<typename T, typename U> inline void amin(T &x, U y) { if(y < x) x = y; }
template<typename T, typename U> inline void amax(T &x, U y) { if(x < y) x = y; }
long long int MOD = 998244353;
int N,M;
string str4[4]={"aacd","bbcd","cdaa","cdbb"};
string str5[5]={"aabbc","hxx.c","h..yd","g..yd","gffee"};
string str3[3]={"aab","d.b","dcc"};
string str7[7]={"aa.bb.a","....cda","b...cd.","b...ffb",".cce..b","adde...","a.bb.aa"};

int main(){
    cin>>N;
    if(N==2){
        cout<<-1<<endl;
    }else if(N==3){
        rep(i,3)cout<<str3[i]<<endl;
    }else if(N==6){
        rep(i,6)cout<<str3[i%3]<<str3[i%3]<<endl;
    }else{
        int x=N%4;
        x+=4;
        if(x==6)x+=4;

        //cout<<N-x<<endl;
        int num=(N-x)/4;
        string ans[1005];
        if(x==4){
            rep(i,N){
                rep(j,N){
                    if(i/4==j/4){
                        cout<<str4[i%4][j%4];
                    }else{
                        cout<<".";
                    }
                }
                cout<<endl;
            }
        }else if(x==5){
            rep(i,N){
                rep(j,N){
                    if(i>=N-5&&j>=N-5){
                        int x=i-(N-5);
                        int y=j-(N-5);
                        cout<<str5[x][y];
                    }else if(i/4==j/4){
                        cout<<str4[i%4][j%4];
                    }else{
                        cout<<".";
                    }
                }
                cout<<endl;
            }
        }else if(x==7){
            rep(i,N){
                rep(j,N){
                    if(i>=N-7&&j>=N-7){
                        int x=i-(N-7);
                        int y=j-(N-7);
                        cout<<str7[x][y];
                    }else if(i/4==j/4){
                        cout<<str4[i%4][j%4];
                    }else{
                        cout<<".";
                    }
                }
                cout<<endl;
            }
        }else{
            rep(i,N){
                rep(j,N){
                    if(i>=N-10&&j>=N-10){
                        int x=i-(N-10);
                        int y=j-(N-10);
                        if(x/5==y/5)cout<<str5[x%5][y%5];
                        else cout<<".";
                    }else if(i/4==j/4){
                        cout<<str4[i%4][j%4];
                    }else{
                        cout<<".";
                    }
                }
                cout<<endl;
            }
        }
    }

}

Measured memory_bytes: 1280