#include<cstdio>
#define RI register int
#define CI const int&
using namespace std;
const int N=1005;
char
tp5[N][N]={
			"aabc.",
			"..bcd",
			"fee.d",
			"f.ghh",
			"iigjj"
		},
tp7[N][N]={
			"ab...c.",
			"ab...c.",
			"..dee.f",
			"..d.g.f",
			"..hhg.i",
			"jj..kki",
			"llmm.nn"
		};
int n; char a[N][N];
inline void odd_paint(CI sx=0)
{
	for (RI i=sx;i<n;i+=2)
	a[i][i]=a[i][i+1]='a',a[i+1>=n?i+1-n+sx:i+1][i]=a[i+1>=n?i+1-n+sx:i+1][i+1]='b',
	a[i+2>=n?i+2-n+sx:i+2][i]=a[i+3>=n?i+3-n+sx:i+3][i]='c',a[i+2>=n?i+2-n+sx:i+2][i+1]=a[i+3>=n?i+3-n+sx:i+3][i+1]='d';
}
inline void print(CI n,char c[N][N])
{
	for (RI i=0;i<n;++i)
	{
		for (RI j=0;j<n;++j) putchar(c[i][j]); if (i!=n-1) putchar('\n');
	}
}
int main()
{
	RI i,j; scanf("%d",&n); if (n==2) return puts("-1"),0;
	if (n==5) return print(5,tp5),0;
	if (n==7) return print(7,tp7),0;
	for (i=0;i<n;++i) for (j=0;j<n;++j) a[i][j]='.';
	if (n%3==0)
	{
		for (i=0;i<n;i+=3) for (j=0;j<n;j+=3)
		a[i][j]=a[i][j+1]='a',a[i+1][j+2]=a[i+2][j+2]='b';
		return print(n,a),0;
	}
	if (n%2==0) return odd_paint(),print(n,a),0;
	for (i=0;i<5;++i) for (j=0;j<5;++j) a[i][j]=tp5[i][j];
	return odd_paint(5),print(n,a),0;
}
#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using WGraph = vector<vector<pair<int, ll>>>;

vector<string> three = {
    "a..",
    "a..",
    ".bb"
};
vector<string> four = {
    "ahff",
    "ahgg",
    "bbde",
    "ccde"
};
vector<string> five = {
    "ahhgg",
    "ai..f",
    "bi..f",
    "b.jje",
    "ccdde"
};
vector<string> six = {
    "aa..hi",
    "bb..hi",
    "cc..jk",
    "..ddjk",
    "..eelm",
    "..fflm"
};
vector<string> seven = {
    "ahhii..",
    "aj..mm.",
    "bjk....",
    "b.k..oo",
    "c..l..p",
    "c..l..p",
    ".ddeeff"
};

int main() {
    int n = 0;
    cin >> n;
    if (n == 2) {
        cout << -1 << endl;
    } else if (n == 3) {
        for (auto s : three) {
            cout << s << endl;
        }
    } else {
        vector<string> ans(n);
        for (int i=0; i<n; i++) {
            for (int j=0; j<n; j++) {
                ans.at(i).push_back('.');
            }
        }
        int mod = n%4;
        if (mod == 0) {
            for (int i=0; i<4; i++) {
                for (int j=0; j<4; j++) {
                    ans.at(i).at(j) = four.at(i).at(j);
                }
            }
        } else if (mod == 1) {
            for (int i=0; i<5; i++) {
                for (int j=0; j<5; j++) {
                    ans.at(i).at(j) = five.at(i).at(j);
                }
            }
        } else if (mod == 2) {
            for (int i=0; i<6; i++) {
                for (int j=0; j<6; j++) {
                    ans.at(i).at(j) = six.at(i).at(j);
                }
            }
        } else if (mod == 3) {
            for (int i=0; i<7; i++) {
                for (int j=0; j<7; j++) {
                    ans.at(i).at(j) = seven.at(i).at(j);
                }
            }
        }
        int cur = 4 + mod;
        while (cur + 4 <= n) {
            for (int i=0; i<4; i++) {
                for (int j=0; j<4; j++) {
                    ans.at(cur+i).at(cur+j) = four.at(i).at(j);
                }
            }
            cur += 4;
        }
        for (auto s : ans) {
            cout << s << endl;
        }
    }
    return 0;
}
