#include<vector>
#include<iostream>
#include<fstream>
#include<string>
#include<cassert>
#include<algorithm>
#include<random>
#include<map>
#include<set>

using namespace std;

//int mod = 998244353;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, int> pli;
typedef pair<ll, ll> pll;
typedef long double ld;
typedef vector<int>vi;
typedef vector<ll>vl;
typedef vector<char>vc;
typedef vector<string>vs;
typedef vector<vector<int>>vvi;
typedef vector<vector<char>>vvc;
typedef vector<vector<ll>>vvl;
typedef vector< pair<ll, ll>>vpll;
typedef vector< pair<ld, ld>>vpld;
typedef vector< pair<int, int>>vpi;
typedef pair<ld, ld>pld;
#define mp make_pair
#define pb push_back

int mod=998244353;
int sum(int a, int b)
{
	int c = a + b;
	if (c >= mod)
	{
		c -= mod;
	}
	return c;
}
int dif(int a, int b)
{
	int c = a - b;
	if (c < 0)
	{
		c += mod;
	}
	return c;
}
int mlt(int a, int b)
{
	ll c = a * 1LL * b;
	return c % mod;
}
int ibit(int n, int i)
{
	return ((n >> i) & 1);
}
void outp(vvi &ou)
{
	for (int i = 0; i < ou.size(); i++)
	{
		for (int j = 0; j < ou[i].size(); j++)
		{
			if (ou[i][j] > 0)
			{
				cout << char(ou[i][j] + 'a');
			}
			else
				cout << '.';
		}
		cout << endl;
	}
}
vvi pereb(int n, vvi poses,  int cur, vi vert, vi hor)
{
	vvi bad;
	for (int i1 = 0; i1 < 2*n; i1++)
	{
		int i = rand() % n;
		if (vert[i] < 3)
		{
			for (int j1 = 0; j1 < 2*n; j1++)
			{
				int j = rand() % n;
				if (hor[j] < 3)
				{
					if (poses[i][j] == 0)
					{
						int x1 = i + 1, y1 = j;
						if ((x1 >= 0) && (x1 < n) && (y1 >= 0) && (y1 < n) && (vert[x1] < 3) && (hor[y1] < 3) && (!poses[x1][y1]))
						{
							vvi np = poses;
							np[i][j] = cur;
							np[x1][y1] = cur;
							vi v1 = vert, h1 = hor;
							v1[i] = vert[i] + 1;
							v1[x1] = vert[x1] + 1;
							h1[j] = hor[j] + 1;
							h1[y1] = hor[y1] + 1;
							vvi tw = pereb(n, np, cur + 1, v1, h1);
							if (tw != bad)
								return tw;
						}
						x1 = i, y1 = j - 1;
						if ((x1 >= 0) && (x1 < n) && (y1 >= 0) && (y1 < n) && (vert[x1] < 3) && (hor[y1] < 3) && (!poses[x1][y1]))
						{
							vvi np = poses;
							np[i][j] = cur;
							np[x1][y1] = cur;
							vi v1 = vert, h1 = hor;
							v1[i] = vert[i] + 1;
							v1[x1] = vert[x1] + 1;
							h1[j] = hor[j] + 1;
							h1[y1] = hor[y1] + 1;
							vvi tw = pereb(n, np, cur + 1, v1, h1);
							if (tw != bad)
								return tw;
						}
						x1 = i - 1, y1 = j;
						if ((x1 >= 0) && (x1 < n) && (y1 >= 0) && (y1 < n) && (vert[x1] < 3) && (hor[y1] < 3) && (!poses[x1][y1]))
						{
							vvi np = poses;
							np[i][j] = cur;
							np[x1][y1] = cur;
							vi v1 = vert, h1 = hor;
							v1[i] = vert[i] + 1;
							v1[x1] = vert[x1] + 1;
							h1[j] = hor[j] + 1;
							h1[y1] = hor[y1] + 1;
							vvi tw = pereb(n, np, cur + 1, v1, h1);
							if (tw != bad)
								return tw;
						}
						x1 = i, y1 = j + 1;
						if ((x1 >= 0) && (x1 < n) && (y1 >= 0) && (y1 < n) && (vert[x1] < 3) && (hor[y1] < 3) && (!poses[x1][y1]))
						{
							vvi np = poses;
							np[i][j] = cur;
							np[x1][y1] = cur;
							vi v1 = vert, h1 = hor;
							v1[i] = vert[i] + 1;
							v1[x1] = vert[x1] + 1;
							h1[j] = hor[j] + 1;
							h1[y1] = hor[y1] + 1;
							vvi tw = pereb(n, np, cur + 1, v1, h1);
							if (tw != bad)
								return tw;
						}
					}
				}
			}
		}
	}
	for (int i = 0; i < n; i++)
	{
		if (hor[i] != 3)
			return bad;
		if (vert[i] != 3)
			return bad;
	}
	return poses;
}
void cp(vvc &h, vs v)
{
	for (int i = 0; i < v.size(); i++)
	{
		for (int j = 0; j < v.size(); j++)
		{
			h[i][j] = v[i][j];
		}
	}
}
vs v4 = {"aabc", "ddbc","efxx", "efyy"}, v5 = {"gh.ii", "ghb..", "kkb.f", "c.eef", "cjjdd"}, v6 = {"..kkel", "..i.el", "mmi..f", "hhjj.f", "dg.cc.", "dg..bb"}, v7 = {".h..ig.", ".h..ig.", "ooll..m", "..dnn.m", "e.d..jj", "e.kk..f", "bb..ccf"};
void ct(int n)
{
	if (n < 3)
	{
		cout << -1 << endl;
	}
	else
	{
		if (n == 3)
		{
			cout << "a.." << endl << "a.." << endl << ".bb" << endl;
		}
		else
		{
			int cur = n;
			vvc pos(n, vector<char>(n,'.'));
			while (cur > 7)
			{
				for (int i = cur - 4; i < cur; i++)
				{
					for (int j = cur - 4; j < cur; j++)
					{
						pos[i][j] = v4[i - cur + 4][j - cur + 4];
					}
				}
				cur -= 4;
			}
			if (cur == 4)
				cp(pos, v4);
			if (cur == 5)
				cp(pos, v5);
			if (cur == 6)
				cp(pos, v6);
			if (cur == 7)
				cp(pos, v7);
			for (int i = 0; i < n; i++)
			{
				for (int j = 0; j < n; j++)
					cout << pos[i][j];
				cout << endl;
			}
		}
	}
}
void solve(istream &cin = std::cin, ostream &cout = std::cout)
{
	int n;
	cin >> n;
	ct(n);
}
int main()
{
	solve();
	int n;
	cin >> n;
}

Measured memory_bytes: 2176