#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
#include<cassert>
#include<complex>
using namespace std;

//#define int long long
typedef long long ll;

typedef unsigned long long ul;
typedef unsigned int ui;
const ll mod = 1000000007;
const ll INF = mod * mod;
typedef pair<int, int>P;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef pair<ll, ll> LP;
typedef long double ld;
typedef pair<ld, ld> LDP;
const ld eps = 1e-6;
const ld pi = acos(-1.0);
typedef vector<vector<ll>> mat;
typedef vector<ll> vec;

void debug(vec &v) {
	int n = v.size();
	rep(i, n) {
		if (i > 0)cout << " ";
		cout << v[i];
	}
	cout << endl;
}
vector<string> s3 = { "a..","a..",".bb" };
vector<string> s4 = { "ccef","ddef","ghii","ghjj" };
vector<string> s5 = { "aaggh","bbj.h","ccjii","..def","..def" };
vector<string> s6 = { "a..ccd","a..f.d",".bbfee","gjjk..","g.ik..","hhi.ll" };
vector<string> s7 = { "aaggi..","bbhhi..","ccj..ll","..j..mn","...kkmn","....def","....def" };
vector<string> s9;

void init() {
	s9.resize(9);
	rep(i, 9) {
		s9[i].resize(9,'.');
	}
	rep(i, 3)rep(j, 3) {
		int lx = i * 3;
		int ly = j * 3;
		rep(x, 3)rep(y, 3) {
			s9[x + lx][y + ly] = s3[x][y];
		}
	}
}

void solve() {
	int n; cin >> n; 
	
	vector<string> ans(n);
	rep(i, n) {
		ans[i].resize(n, '.');
	}
	if (n % 3 == 0) {
		
		rep(i, n / 3) {
			int l = i * 3;
			rep(x, 3)rep(y, 3) {
				ans[x + l][y + l] = s3[x][y];
			}
		}
		rep(i, n)cout << ans[i] << endl;
		return;
	}
	int cop = n;
	int tmp = 0;
	while (cop % 4 != 0) {
		cop -= 9; tmp++;
	}
	if (cop >= 0) {
		int c9 = tmp;
		int c4 = cop / 4;
		int cur = 0;
		rep(i, c9) {
			rep(x, 9)rep(y, 9) {
				ans[x + cur][y + cur] = s9[x][y];
			}
			cur += 9;
		}
		rep(i, c4) {
			rep(x, 4)rep(y, 4) {
				ans[x + cur][y + cur] = s4[x][y];
			}
			cur += 4;
		}
		rep(i, n)cout << ans[i] << endl;
		return;
	}
	if (n == 2) {
		cout << -1 << endl; return;
	}
	if (n % 4 == 1) {
		rep(i, 5)rep(j, 5) {
			ans[i][j] = s5[i][j];
		}
		int cur = 5;
		int c4 = (n - 5) / 4;
		rep(i, c4) {
			rep(x, 4)rep(y, 4) {
				ans[x + cur][y + cur] = s4[x][y];
			}
			cur += 4;
		}
		rep(i, n)cout << ans[i] << endl;
		return;
	}
	else if(n%4==3){
		rep(i, 7)rep(j, 7) {
			ans[i][j] = s7[i][j];
		}
		int cur = 7;
		int c4 = (n - 7) / 4;
		rep(i, c4) {
			rep(x, 4)rep(y, 4) {
				ans[x + cur][y + cur] = s4[x][y];
			}
			cur += 4;
		}
		rep(i, n)cout << ans[i] << endl;
		return;
	}
	else if (n % 4 == 2) {
		rep(i, 6)rep(j, 6) {
			ans[i][j] = s6[i][j];
		}
		int cur = 6;
		int c4 = (n - 6) / 4;
		rep(i, c4) {
			rep(x, 4)rep(y, 4) {
				ans[x + cur][y + cur] = s4[x][y];
			}
			cur += 4;
		}
		rep(i, n)cout << ans[i] << endl;
		return;
	}
}


signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	//cout << fixed << setprecision(12);
	init();
	//int t; cin >> t; rep(i, t)solve();
	solve();
	stop
	return 0;
}

Measured memory_bytes: 2304