#include "bits/stdc++.h"
using namespace std;
#ifndef LOCAL
#define endl '\n'
#endif
 
#define fr(i, a, b) for(int i = a; i <= b; i++)
#define pf push_front
#define pb push_back
#define fi first
#define se second
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define sz(x) (int)x.size()
#define rsz resize()
#define lb lower_bound
#define ub upper_bound
 
typedef long long ll;
typedef long double f80;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
 
int pct(int x) { return __builtin_popcount(x); }
int pct(ll x) { return __builtin_popcountll(x); } 
int bit(int x) { return 31 - __builtin_clz(x); } // floor(log2(x))
int bit(ll x) { return 63 - __builtin_clzll(x); } // floor(log2(x))
int cdiv(int a, int b) { return a / b + !(a < 0 || a % b == 0); }
ll cdiv(ll a, ll b) { return a / b + !(a < 0 || a % b == 0); }
 
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
 
ll rand(ll l, ll r){
	uniform_int_distribution<ll> uid(l, r);
	return uid(rng);
}
 
#ifdef LOCAL
#define debug(...) cerr << "[L:" << __LINE__ << "][" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif
 
#ifndef LOCAL
string to_string(__int128 x) {
	string s = "";
	bool neg = 0;
	if(x < 0) { s += "-"; neg = 1; }
	if(!x) s += '0';
	while(x) {
		int rem = x % 10;
		s += to_string(rem);
		x /= 10;
	}
	reverse(s.begin() + neg, s.end());
	return s;
}
#endif
 
const int mod = 1e9 + 7; // 998244353;
 
int pwr(int a,int b) {
	int ans = 1;
	while(b) {
		if(b & 1) ans = (ans * 1LL * a) % mod;
		a = (a * 1LL * a) % mod;
		b >>= 1;
	}
	return ans;
}
 
/*
	Lookout for overflows!!
	Check array sizes!!
	Clear before test cases!!
	Use the correct modulo!!
	Check for corner cases!!
	Are you forgetting something?!
*/
 
const int N = 1005;
 
char a[3][3] = {{'a','b','b'},{'a','.','c'},{'d','d','c'}};
char b[4][4] = {{'a','b','c','c'},{'a','b','d','d'},{'e','e','f','g'},{'h','h','f','g'}};
char c[5][5] = {{'a','b','c','.','.'},{'a','b','c','.','.'},{'d','e','e','f','f'},{'d','.','g','h','h'},{'i','i','g','j','j'}};
char d[6][6] = {{'a','b','c','.','.','.'},{'a','b','c','.','.','.'},{'d','.','e','e','f','f'},{'d','g','h','h','.','.'},{'.','g','.','i','j','j'},{'k','k','.','i','l','l'}};
char e[7][7] = {{'a','b','c','.','.','.','.'},{'a','b','c','.','.','.','.'},{'d','e','f','.','.','.','.'},{'d','e','f','.','.','.','.'},{'g','.','.','h','h','i','i'},{'g','.','.','j','j','k','k'},{'.','l','l','m','m','n','n'}};
char ans[N][N];
void solve() {
	int n;
	cin >> n;
	if(n <= 2) {
		cout << -1;
		return;
	}
	fr(i, 0, n - 1) {
		fr(j, 0, n - 1) {
			ans[i][j] = '.';
		}
	}
	if(n == 3) {
		fr(i, 0, n - 1) {
			fr(j, 0, n - 1) {
				ans[i][j] = a[i][j];
			}
		}
	}
	else {
		int kk = 4 + (n % 4);
		int i;
		for(i = 0; i < n - kk; i += 4) {
			fr(j, 0, 3) {
				fr(k, 0, 3) {
					ans[i + j][i + k] = b[j][k];
				}
			}
		}
		if(kk == 4) {
			fr(j, 0, kk - 1) {
				fr(k, 0, kk - 1) {
					ans[i + j][i + k] = b[j][k];
				}
			}
		}
		if(kk == 5) {
			fr(j, 0, kk - 1) {
				fr(k, 0, kk - 1) {
					ans[i + j][i + k] = c[j][k];
				}
			}
		}
		if(kk == 6) {
			fr(j, 0, kk - 1) {
				fr(k, 0, kk - 1) {
					ans[i + j][i + k] = d[j][k];
				}
			}
		}
		if(kk == 7) {
			fr(j, 0, kk - 1) {
				fr(k, 0, kk - 1) {
					ans[i + j][i + k] = e[j][k];
				}
			}
		}
	}
	fr(i, 0, n - 1) {
		fr(j, 0, n - 1) {
			cout << ans[i][j];
		}
		cout << endl;
	}
}
 
int main() {
	ios :: sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	int t;
	// cin >> t;
	t = 1;
	for(int tt = 1; tt <= t; tt++) {
		solve();
	}
	return 0;
}

Measured memory_bytes: 2176