#ifndef BZ
#pragma GCC optimize "-O3"
#endif
#include <bits/stdc++.h>

#define ALL(v) (v).begin(), (v).end()
#define rep(i, l, r) for (int i = (l); i < (r); ++i)

using ll = long long;
using ld = long double;
using ull = unsigned long long;

using namespace std;


/*
ll pw(ll a, ll b) {
	ll ans = 1; while (b) {
		while (!(b & 1)) b >>= 1, a = (a * a) % MOD;
		ans = (ans * a) % MOD, --b;
	} return ans;
}
*/

const int N = 2100;

int n;

int a[N][N];

int cr[N];
int cc[N];

vector<vector<pair<int, int>>> vv;

char ans[N][N];

vector<vector<pair<int, int>>> ans5 = {{{0,2},{1,2}},{{0,3},{1,3}},{{0,4},{1,4}},{{2,0},{2,1}},{{2,2},{2,3}},{{2,4},{3,4}},{{3,0},{3,1}},{{3,2},{4,2}},{{4,0},{4,1}},{{4,3},{4,4}}};
vector<vector<pair<int, int>>> ans7 = {{{0,4},{1,4}},{{0,5},{1,5}},{{0,6},{1,6}},{{2,4},{3,4}},{{2,5},{3,5}},{{2,6},{3,6}},{{4,0},{4,1}},{{4,2},{4,3}},{{4,6},{5,6}},{{5,0},{5,1}},{{5,2},{5,3}},{{6,0},{6,1}},{{6,2},{6,3}},{{6,4},{6,5}}};

vector<vector<pair<int, int>>> ans4 = {{{0,0},{0,1}},{{0,2},{1,2}},{{0,3},{1,3}},{{1,0},{1,1}},{{2,0},{3,0}},{{2,1},{3,1}},{{2,2},{2,3}},{{3,2},{3,3}}};

vector<vector<pair<int, int>>> ans3 = {{{0,2},{1,2}},{{2,0},{2,1}}};



void out() {
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < n; ++j) {
			ans[i][j] = '.';
		}
	}
	for (auto d: vv) {
		int x = d[0].first % 4;
		int y = d[0].second % 4;
		char c = 'a' + (x * 4 + y);
		ans[d[0].first][d[0].second] = c;
		ans[d[1].first][d[1].second] = c;
	}

	for (int i = 0; i < n; ++i) {
		cout << ans[i] << "\n";
	}
	exit(0);
}

void run(int x, int y) {
	if (y == n) {
		if (cr[x] != cr[0]) {
			return;
		}
		run(x + 1, 0);
		return;
	}
	if (x == n) {
		int g = cr[0];
		if (g == 0) {
			return;
		}
		for (int i = 0; i < n; ++i) {
			if (cr[i] != g || cc[i] != g) {
				return;
			}
		}
		out();
	}
	run(x, y + 1);
	if (!a[x][y]) {
		vector<pair<int, int>> ar(2);
		ar[0] = {x, y};
		if (y + 1 < n && !a[x][y + 1]) {
			++cr[x];
			++cc[y];
			++cc[y + 1];
			a[x][y] = a[x][y + 1] = 1;
			ar[1] = {x, y + 1};
			vv.push_back(ar);
			run(x, y + 1);
			a[x][y] = a[x][y + 1] = 0;
			vv.pop_back();
			--cr[x];
			--cc[y];
			--cc[y + 1];
		}
		if (x + 1 < n && !a[x + 1][y]) {
			++cr[x];
			++cc[y];
			++cr[x + 1];
			a[x][y] = a[x + 1][y] = 1;
			ar[1] = {x + 1, y};
			vv.push_back(ar);
			run(x, y + 1);
			a[x][y] = a[x + 1][y] = 0;
			vv.pop_back();
			--cr[x];
			--cc[y];
			--cr[x + 1];
		}
	}
}

vector<pair<int, int>> add(vector<pair<int, int>> x, int d) {
	for (auto& p: x) {
		p.first += d;
		p.second += d;
	}
	return x;
}

int main() {
	ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
	cout.setf(ios::fixed), cout.precision(20);
	cin >> n;
	if (n == 2) {
		cout << -1 << "\n";
		return 0;
	}

	if (n % 3 == 0) {
		for (int i = 0; i < n; i += 3) {
			for (auto d: ans3) {
				vv.push_back(add(d, i));
			}
		}
		out();
	}

	if (n == 7) {
		vv = ans7;
		out();
	}

	if (n == 11) {
		vv = ans7;
		for (auto d: ans4) {
			vv.push_back(add(d, 7));
		}
		out();
	}

	for (int i = 0; 4 * i <= n; ++i) {
		if ((n - 4 * i) % 5 == 0) {
			int j = (n - 4 * i) / 5;
			int sh = 0;
			for (int x = 0; x < i; ++x, sh += 4) {
				for (auto d : ans4) {
					vv.push_back(add(d, sh));
				}
			}
			for (int x = 0; x < j; ++x, sh += 5) {
				for (auto d : ans5) {
					vv.push_back(add(d, sh));
				}
			}
			out();
		}
	}


	assert(false);

	return 0;
}




Measured memory_bytes: 7424