/* cerberus97 - Hanit Banga */

#include <iostream>
#include <iomanip>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>

using namespace std;

#define pb push_back
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL)

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const int N = 1e3 + 10;

vector<pii> solve(int n);

vector<string> base[10];

int main() {
	base[4] = {
		"aabc",
		"ccbc",
		"abdd",
		"abcc"
	};
	base[5] = {
		"aabba",
		"bcc.a",
		"b..ab",
		"a..ab",
		"abbcc",
	};
	base[7] = {
		"aa.a.aa",
		".bbabb.",
		"..aba..",
		"..aba..",
		"a.cc..a",
		"a...a.a",
		"bb..abb",
	};
	fast_cin();
	int n; cin >> n;
	vector<string> a(n, string(n, '.'));
	if (n % 3 == 0) {
		for (int i = 0; i < n; i += 3) {
			a[i][i] = a[i][i + 1] = 'a';
			a[i + 1][i + 2] = a[i + 2][i + 2] = 'a';
		}
	} else {
		auto vals = solve(n);
		if (vals.empty()) {
			cout << -1 << endl;
			return 0;
		}
		int i = 0;
		for (auto& p : vals) {
			int val = p.first, cnt = p.second;
			while (cnt--) {
				for (int j = 0; j < val; ++j) {
					for (int k = 0; k < val; ++k) {
						a[i + j][i + k] = base[val][j][k];
					}
				}
				i += val;
			}
		}
	}
	for (auto& s : a) {
		cout << s << '\n';
	}
}

vector<pii> solve(int n) {
	for (int c4 = 0; c4 <= n; ++c4) {
		for (int c5 = 0; c5 <= n; ++c5) {
			if (4 * c4 + 5 * c5 > n) {
				break;
			}
			int left = n - 4 * c4 - 5 * c5;
			if (left % 7 == 0) {
				return {{4, c4}, {5, c5}, {7, left / 7}};
			}
		}
	}
	return {};
}