#define _USE_MATH_DEFINES
#include<iostream>
#include<string>
#include<queue>
#include<cmath>
#include<map>
#include<set>
#include<list>
#include<iomanip>
#include<vector>
#include<random>
#include<functional>
#include<algorithm>
#include<stack>
#include<cstdio>
#include<cstring>
#include<bitset>
#include<unordered_map>
#include<climits>
#include<fstream>
#include<time.h>
#include<cassert>
#include<functional>
#include<numeric>
#include <tuple>

using namespace std;
#define ll long long
#define ld long double
#define int long long
#define all(a) (a).begin(),(a).end()
#define EPS (1e-13)
#define fs first
#define sc second
#define xx first
#define yy second.first
#define zz second.second
#define H pair<int, int>
#define P pair<int, pair<int, int>>
#define Q(i,j,k) mkp(i,mkp(j,k))
#define rep(i,n) for(int (i) = 0 ; (i) < (n) ; (i)++)
#define mkp make_pair
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define crdcomp(b) sort(all((b)));(b).erase(unique(all((b))),(b).end())
#define ssp(i,n) (i==n-1?"\n":" ")
#define tpop(p) p.top();p.pop()
const int mod = 1e9 + 7;
const int Mod = 998244353;
const ll Inf = 3 * 1e18;
ll gcd(ll i, ll j) {
	if (i > j) swap(i, j);
	if (i == 0) return j;
	return gcd(j % i, i);
}
ll mod_pow(ll x, ll n, ll p) {
	ll res = 1;
	while (n > 0) {
		if (n & 1) res = res * x % p;
		x = x * x % p;
		n >>= 1;
	}
	return res;
}
ll bitcount(ll x) {
	int sum = 0;
	for (int i = 0; i < 20; i++)
		if ((1ll << i) & x) sum++;
	return sum;
}
/*const int fn_ = 2000000;
ll fact_[fn_], comp_[fn_];
ll comb(ll x, ll y, ll Mod = mod) {
	if (!fact_[0]) {
		fact_[0] = 1; comp_[0] = 1;
		for (int i = 1; i < fn_; i++) {
			fact_[i] = fact_[i - 1] * i % Mod;
			comp_[i] = mod_pow(fact_[i], Mod - 2, Mod);
		}
	}
	if (x < y) return 0;
	return fact_[x] * comp_[x - y] % Mod * comp_[y] % Mod;
}*/
//---------------------------------------------------
int a[2000][2000];
string b[4] = {
	"aabd",
	"ccbd",
	"efgg",
	"efhh"
};
string c[3] = {
	"iij",
	"k.j",
	"kll"
};
string e[5] = {
	"aabbc",
	"ddf.c",
	"eefgg",
	"..hij",
	"..hij"
};
string f[7] = {
	"aabbcc.",
	"dd.dd.a",
	"..d..da",
	"..d..db",
	"dd.dd.b",
	"..d..dc",
	"..d..dc"
};
int n;
string d[2000];
signed main() {
	cin >> n;
	if (n == 2) {
		cout << -1 << endl;
		return 0;
	}
	if (n == 7) {
		for (int j = 0; j < 7; j++) {
			cout << f[j] << endl;
		}
		return 0;
	}
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			d[i] += '.';
		}
	}
	if (n == 11) {
		for (int i = 0; i < 4;) {
			for (int j = 0; j < 4; j++) {
				for (int x = 0; x < 4; x++) {
					d[i + j][i + x] = b[j][x];
				}
			}
			i += 4;
		}
		for (int i = 4; i < n;) {
			for (int j = 0; j < 7; j++) {
				for (int x = 0; x < 7; x++) {
					d[i + j][i + x] = f[j][x];
				}
			}
			i += 7;
		}
		goto loop;
	}
	for (int i = 0; i < n; i) {
		if (n % 3 == 0) {
			for (int j = 0; j < 3; j++) {
				for (int x = 0; x < 3; x++) {
					d[i + j][i + x] = c[j][x];
				}
			}
			i += 3;
		}
		else if ((n - i) % 4 == 0) {
			for (int j = 0; j < 4; j++) {
				for (int x = 0; x < 4; x++) {
					d[i + j][i + x] = b[j][x];
				}
			}
			i += 4;
		}
		else {
			for (int j = 0; j < 5; j++) {
				for (int x = 0; x < 5; x++) {
					d[i + j][i + x] = e[j][x];
				}
			}
			i += 5;
		}
	}
loop:;
	for (int i = 0; i < n; i++) {
		cout << d[i] << endl;
	}
}

Measured memory_bytes: 2304