#include <iostream>
#include <iomanip>
#include <random>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <cmath>
#include <numeric>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <sstream>
#include <bitset>
#include <cassert>
#include <fstream>
#include <queue>

#define len(X) ((int)(X).size())

#ifdef __LOCAL
	#define DBG(X) cout << #X << "=" << (X) << '\n';
	#define SAY(X) cout << (X) << '\n';
#else
	#define DBG(X)
	#define SAY(X)
#endif
 
using namespace std;

using ll = long long int;
using ull = unsigned long long int;
using ld  = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

const int INT_INF = (int)(2e9);
const ll  LL_INF  = (ll)(2e18);

const int NIL = -1;
static mt19937 _g(time(nullptr));

inline ll randint(ll a, ll b) { ll w = (_g() << 31LL) ^ _g(); return a + w % (b - a + 1); }
inline void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); };
template<typename T> inline T sign(T x) { return T(x > 0) - T(x < 0); }
template<typename T, typename S> inline ostream& operator<<(ostream& os, const pair<T, S> p) { cout << "[" << p.first << ";" << p.second << "]"; return os; }
template<typename T> inline ostream& operator<<(ostream& os, const vector<T>& v) { for(auto el: v) cout << el << " "; return os; }
template<typename T> inline T fetch() { T ret; cin >> ret; return ret; }
template<typename T> inline vector<T> fetch_vec(int sz) { vector<T> ret(sz); for(auto& elem: ret) cin >> elem; return ret; }

const int MAXN = 1007;
int dp[MAXN], p[MAXN];
char G[MAXN][MAXN];

void init() {
	dp[0] = 1;
	for(int i = 0; i < MAXN; ++i) {
		for(auto& j: {i + 4, i + 6, i + 9}) {
			if(j < MAXN && dp[j] == 0 && dp[i] == 1) {
				dp[j] = 1;
				p[j]  = i;
			}
		}
	}
}

const vector<string> A4 = {
	"aacd",
	"bbcd",
	"cdaa",
	"cdbb"
};

const vector<string> A6 = {
	"aa.aae",
	"..bc.e",
	"..bcdd",
	"aaeaa.",
	"c.e..b",
	"cdd..b"
};

const vector<string> A9 = {
	"aa.aa.aa.",
	"..b..b..b",
	"..b..b..b",
	"aa.aa.aa.",
	"..b..b..b",
	"..b..b..b",
	"aa.aa.aa.",
	"..b..b..b",
	"..b..b..b"
};

void build(int n, int top) {
	if(n == 0) return;

	if(n == 3) {
		cout << "aa.\n";
		cout << "..b\n";
		cout << "..b\n";
		return;
	}

	if(n == 5) {
		cout << "abc..\n";
		cout << "abc..\n";
		cout << "deeff\n";
		cout << "d.ghh\n";
		cout << "iigjj\n";

		return;
	}

	if(n == 7) {
		cout << ".aabbcc\n";
		cout << "a..ccdd\n";
		cout << "a..ddcc\n";
		cout << "bcd....\n";
		cout << "bcd....\n";
		cout << "cdc....\n";
		cout << "cdc....\n";

		return;
	}

	if(n == 11) {
		cout << "abc........\n";
		cout << "abc........\n";
		cout << "deeff......\n";
		cout << "d.ghh......\n";
		cout << "iigjj......\n";

		cout << ".....aa.aae\n";
		cout << ".......bc.e\n";
		cout << ".......bcdd\n";

		cout << ".....aaeaa.\n";
		cout << ".....c.e..b\n";
		cout << ".....cdd..b\n";

		return;
	}

	if(!dp[n]) {
		cout << "-1\n";
		return;
	}

	DBG(n);
	int n2 = p[n]; DBG(n2);
	build(n2, 0);
	int diff = n - n2;
	if(diff == 4) {
		for(int i = 0; i < 4; ++i) {
			for(int j = 0; j < 4; ++j) {
				G[n2 + i][n2 + j] = A4[i][j];
			}
		}
	} else if(diff == 6) {
		for(int i = 0; i < 6; ++i) {
			for(int j = 0; j < 6; ++j) {
				G[n2 + i][n2 + j] = A6[i][j];
			}
		}
	} else if(diff == 9) {
		for(int i = 0; i < 9; ++i) {
			for(int j = 0; j < 9; ++j) {
				G[n2 + i][n2 + j] = A9[i][j];
			}
		}
	} else {
		assert(false);
	}

	if(top) {
		string row(n, '%');
		for(int i = 0; i < n; ++i) {
			for(int j = 0; j < n; ++j) {
				row[j] = G[i][j];
			}

			cout << row << '\n';
		}
	}
}

void solve() {
	init();
	int n = fetch<int>();
	for(int i = 0; i < n; ++i) for(int j = 0; j < n; ++j) G[i][j] = '.';
	build(n, 1);
}

int main() {
	fast_io();
	solve();

	return 0;
}


Measured memory_bytes: 2304