#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
#include<tuple>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
const ll mod = 1000000007;
const ll INF = (ll)1000000007 * 1000000007;
typedef pair<int, int> P;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define Per(i,sta,n) for(int i=n-1;i>=sta;i--)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef long double ld;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<ll, ll> LP;
int dx[4]={1,-1,0,0};
int dy[4]={0,0,1,-1};

int n;
vector<string> v4=
{"aabd",
 "ccbd",
 "efgg",
 "efhh"};
vector<string> v5=
{"aabbc",
 "dde.c",
 "ffegg",
 "..hij",
 "..hij"};
vector<string> v7=
{"aabbcc.",
 "ddeef..",
 "gg..fhh",
 "..ij..l",
 "..ij..l",
 "....pqr",
 "....pqr"};
vector<string> v3=
{"aab",
 "c.b",
 "cdd"};
 
vector<string> v10=
{"aabbc.....",
 "dde.c.....",
 "ffegg.....",
 "..hij.....",
 "..hij.....",
 ".....aabbc",
 ".....dde.c",
 ".....ffegg",
 ".......hij",
 ".......hij"};

void solve(){
    int n;cin >> n;
    if(n==2) {
        cout << -1 << endl;
        return;
    }
    vector<vector<char>> ans(n,vector<char>(n,'.'));int pos=0;
    if(n%3==0){
        rep(k,n/3){
            rep(i,3){
                rep(j,3){
                    ans[pos+i][pos+j]=v3[i][j];
                }
            }
            pos+=3;
        }
    }
    else if(n%4==1){
        rep(i,5){
            rep(j,5){
                ans[pos+i][pos+j]=v5[i][j];
            }
        }
        pos+=5;
        rep(k,(n-5)/4){
            rep(i,4){
                rep(j,4){
                    ans[pos+i][pos+j]=v4[i][j];
                }
            }
            pos+=4;
        }

    }
    else if(n%4==3){
        rep(i,7){
            rep(j,7){
                ans[pos+i][pos+j]=v7[i][j];
            }
        }
        pos+=7;
        rep(k,(n-7)/4){
            rep(i,4){
                rep(j,4){
                    ans[pos+i][pos+j]=v4[i][j];
                }
            }
            pos+=4;
        }

    }
    else if(n%4==2){
        rep(i,10){
            rep(j,10){
                ans[pos+i][pos+j]=v10[i][j];
            }
        }
        pos+=10;
        rep(k,(n-10)/4){
            rep(i,4){
                rep(j,4){
                    ans[pos+i][pos+j]=v4[i][j];
                }
            }
            pos+=4;
        }

    }
    else{
        rep(k,n/4){
            rep(i,4){
                rep(j,4){
                    ans[pos+i][pos+j]=v4[i][j];
                }
            }
            pos+=4;
        }
    }
    rep(i,n){
        rep(j,n) cout << ans[i][j] << "";
        cout << "" << endl;
    }
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(50);
    solve();
}

Measured memory_bytes: 2304