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

#define maxn 1005

int n;
char ans[maxn][maxn];
char s3[5][5] = {"aa.", "..b", "..b"};
char s4[5][5] = {"aabd", "ccbd", "deff", "degg"};
char s5[6][6] = {"aaeff", "b.e.g", "b.jjg", ".ccih", "dd.ih"};
char s6[8][8] = {"aabcc.", "b.b..d", "baa..d", "cc.aab", "..db.b", "..dbaa"};
char s7[8][8] = {"a.aa.a.", "a....ac", ".dd.bbc", "b..b..a", "b..b..a", ".ee.ccb", "cc.aa.b"};

int main()
{
    cin >> n;
    for (int i = 0; i < n; i++)
        for (int j = 0; j < n; j++)
            ans[i][j] = '.';
    if (n == 2)
    {
        printf("-1\n");
        return 0;
    }
    if (n == 7)
    {
        for (int i = 0; i < n; i++)
        {
            for (int j = 0; j < n; j++)
                printf("%c", s7[i][j]);
            printf("\n");
        }
        return 0;
    }
    if (n == 3)
    {
        for (int i = 0; i < n; i++)
        {
            for (int j = 0; j < n; j++)
                printf("%c", s3[i][j]);
            printf("\n");
        }
        return 0;
    }
    if (n == 6)
    {
        for (int i = 0; i < n; i++)
        {
            for (int j = 0; j < n; j++)
                printf("%c", s6[i][j]);
            printf("\n");
        }
        return 0;
    }
    if (n == 11)
    {
        for (int i = 0; i < 6; i++)
        {
            for (int j = 0; j < 6; j++)
                ans[i][j] = s6[i][j];
        }
        for (int i = 0; i < 5; i++)
        {
            for (int j = 0; j < 5; j++)
                ans[6 + i][6 + j] = s5[i][j];
        }
        for (int i = 0; i < n; i++)
        {
            for (int j = 0; j < n; j++)
                printf("%c", ans[i][j]);
            printf("\n");
        }
        return 0;
    }
    int x, y;
    // 4x+5y=n
    for (int i = 0; i * 4 <= n; i++)
    {
        if ((n - 4 * i) % 5 == 0)
        {
            x = i;
            y = (n - 4 * i) / 5;
        }
    }
    //printf("%d %d\n", x, y);
    for (int i = 0; i < x; i++)
    {
        for (int j = 0; j < 4; j++)
        {
            for (int k = 0; k < 4; k++)
                ans[i * 4 + j][i * 4 + k] = s4[j][k];
        }
    }
    for (int i = 0; i < y; i++)
    {
        for (int j = 0; j < 5; j++)
        {
            for (int k = 0; k < 5; k++)
                ans[4 * x + i * 5 + j][4 * x + i * 5 + k] = s5[j][k];
        }
    }
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < n; j++)
            printf("%c", ans[i][j]);
        printf("\n");
    }
    return 0;
}
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

template<typename T>
ostream& operator<<(ostream &os, vector<T> &v){
	string sep = " ";
	if(v.size()) os << v[0];
	for(int i=1; i<v.size(); i++) os << sep << v[i];
	return os;
}

template<typename T>
istream& operator>>(istream &is, vector<T> &v){
	for(int i=0; i<v.size(); i++) is >> v[i];
	return is;
}

#ifdef DBG
void debug_(){ cout << endl; }
template<typename T, typename... Args>
void debug_(T&& x, Args&&... xs){
	cout << x << " "; debug_(forward<Args>(xs)...);
}
#define dbg(...) debug_(__VA_ARGS__)
#else
#define dbg(...)
#endif

void rec(vector<vector<int>> &b, int k, vector<vector<vector<int>>> &res){
	int n = b.size();
	int mx = 0;
	for(int i=0; i<n; i++){
		for(int j=0; j<n; j++) mx=max(mx, b[i][j]);
	}
	int si=0, sj=0;
	if(mx>0){
		bool done = false;
		for(int i=0; i<n; i++){
			for(int j=0; j<n; j++){
				if(b[i][j]==mx){
					si = i;
					sj = j;
					done=true;
					break;
				}
			}
			if(done) break;
		}
	}

	int x = -1;
	bool ok = true;
	for(int i=0; i<n; i++){
		set<int> a;
		for(int j=0; j<n; j++){
			if(b[i][j]>0) a.insert(b[i][j]);
		}
		if(x<0) x = a.size();
		if(a.size()>k) return;
		if(x!=a.size()){
			if(i<si) return;
			ok = false;
		}
	}
	for(int i=0; i<n; i++){
		set<int> a;
		for(int j=0; j<n; j++){
			if(b[j][i]>0) a.insert(b[j][i]);
		}
		if(a.size()>k) return;
		if(x!=a.size()) ok = false;
	}
	if(ok && x==k){
		res.push_back(b);
		return;
	}

	for(int i=si; i<n; i++){
		for(int j=(i==si?sj:0); j<n; j++){
			if(i+1<n&&b[i][j]==0&&b[i+1][j]==0){
				b[i][j] = b[i+1][j] = mx+1;
				rec(b, k, res);
				if(res.size()) return;
				b[i][j] = b[i+1][j] = 0;
			}
			if(j+1<n&&b[i][j]==0&&b[i][j+1]==0){
				b[i][j] = b[i][j+1] = mx+1;
				rec(b, k, res);
				if(res.size()) return;
				b[i][j] = b[i][j+1] = 0;
			}
		}
	}
}

vector<vector<vector<int>>> naive(int n, int k){
	vector<vector<vector<int>>> ret;
	vector<vector<int>> b(n, vector<int>(n));
	rec(b, k, ret);
	return ret;
}

string x3[3] = {
	"aab",
	"c.b",
	"cdd",
};

string x4[4] = {
	"aabc",
	"ddbc",
	"efgg",
	"efhh",
};

string x5[5] = {
	"..abc",
	"..abc",
	"ddeef",
	"ggh.f",
	"iihjj",
};

string x6[6] = {
	"abc...",
	"abc...",
	"d.eeff",
	"dghh..",
	".g.ijj",
	"kk.ill",
};

string x7[7] = {
	"abc....",
	"abc....",
	"def....",
	"def....",
	"g..hhii",
	"g..jjkk",
	".llmmnn",
};


int main() {
	ios_base::sync_with_stdio(false);
	cout << setprecision(20) << fixed;

	int n; cin >> n;

	if(n<=2){
		cout << -1 << endl;
		return 0;
	}

	if(n==3){
		for(int i=0; i<3; i++) cout << x3[i] << endl;
		return 0;
	}

	int k = n%4+4;
	int l = n/4-1;
	for(int i=0; i<l; i++){
		for(int j=0; j<4; j++){
			cout << string(i*4, '.') << x4[j] << string(n-4*(i+1), '.') << endl;
		}
	}
	if(k==4){
		for(int j=0; j<4; j++){
			cout << string(n-4, '.') << x4[j] << endl;
		}
	} else if(k==5){
		for(int j=0; j<5; j++){
			cout << string(n-5, '.') << x5[j] << endl;
		}
	} else if(k==6){
		for(int j=0; j<6; j++){
			cout << string(n-6, '.') << x6[j] << endl;
		}
	} else if(k==7){
		for(int j=0; j<7; j++){
			cout << string(n-7, '.') << x7[j] << endl;
		}
	}

	return 0;
}
