#ifndef LOCAL
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,mmx,tune=native")
#endif //LOCAL

#define _SCL_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS

#pragma comment(linker, "/STACK:256000000")

//#define push_back pb
#define first x
#define second y

#include <cassert>
#include <ciso646>
#include <climits>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <array>
#include <bitset>
#include <deque>
#include <forward_list>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <algorithm>
#include <complex>
#include <functional>
#include <initializer_list>
#include <iterator>
#include <limits>
#include <locale>
#include <numeric>
#include <regex>
#include <string>
#include <utility>
#include <fstream>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <random>
#include <memory>
#include <chrono>

#ifdef LOCAL
//#include <vld.h>
#endif //LOCAL
using namespace std;

//typedef __int128_t ll;
typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int uint;
typedef long double ld;

#define speedup cout.tie(nullptr);cin.tie(nullptr);ios_base::sync_with_stdio(false)
#define coutdouble cout<<setprecision(20);cout<<fixed

#define all(v) (v).begin(),(v).end()
#define sz(v) (int)(v).size()

#ifdef LOCAL
mt19937 rd(57322);
#else
mt19937 rd((uint)chrono::steady_clock::now().time_since_epoch().count());
#endif
/*------CommentInInteractive--------*/
#ifndef LOCAL
#define endl '\n'
#endif //LOCAL
/*----------------------------------*/
const int INF = 1000 * 1000 * 1000 + 322;
const ll LLINF = 2LL * 1000LL * 1000LL * 1000LL * 1000LL * 1000LL * 1000LL + 57;
constexpr uint MOD = 1000 * 1000 * 1000 + 7;
constexpr uint FFT_MOD = 998244353;
const int P1E6 = 1336337;
const int P1E3 = 1009;
const ll P1E14 = 100000000000031;
const ll P1E17 = 100000000000000003;
const ld PI = acosl(-1.);//3.1415926535897932384626433832795
const ld EPS = 1e-9;
/*------------------------------------------------IO_OPERATORS---------------------------------------------*/
template<typename T, typename U> inline ostream &operator << (ostream &_out, const pair<T, U> &_p) { _out << _p.first << " " << _p.second; return _out; }
template<typename T, typename U> inline istream &operator >> (istream &_in, pair<T, U> &_p) { _in >> _p.first >> _p.second; return _in; }
template<typename T> inline ostream &operator << (ostream &_out, const vector<T> &_v) { if (_v.empty()) return _out; _out << _v.front(); for (auto _it = ++_v.begin(); _it != _v.end(); ++_it) _out << ' ' << *_it; return _out; }
template<typename T> inline istream &operator >> (istream &_in, vector<T> &_v) { for (auto &_i : _v) _in >> _i; return _in; }
template<typename T> inline ostream &operator << (ostream &_out, const set<T> &_s) { if (_s.empty()) return _out; _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) _out << ' ' << *_it; return _out; }
template<typename T> inline ostream &operator << (ostream &_out, const multiset<T> &_s) { if (_s.empty()) return _out; _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) _out << ' ' << *_it; return _out; }
template<typename T> inline ostream &operator << (ostream &_out, const unordered_set<T> &_s) { if (_s.empty()) return _out; _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) _out << ' ' << *_it; return _out; }
template<typename T> inline ostream &operator << (ostream &_out, const unordered_multiset<T> &_s) { if (_s.empty()) return _out; _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) _out << ' ' << *_it; return _out; }
template<typename T, typename U> inline ostream &operator << (ostream &_out, const map<T, U> &_m) { if (_m.empty()) return _out; _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) _out << ", (" << _it->first << ": " << _it->second << ')'; return _out; }
template<typename T, typename U> inline ostream &operator << (ostream &_out, const unordered_map<T, U> &_m) { if (_m.empty()) return _out; _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')'; for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) _out << ", (" << _it->first << ": " << _it->second << ')'; return _out; }
/*--------------------------------------------------IO_FILES-----------------------------------------------*/
const char * infile =
#ifdef LOCAL
"input.txt"
#else
""
#endif //LOCAL
;
const char * outfile =
#ifdef LOCAL
""
#else
""
#endif //LOCAL
;

/*-------------------------------------------------ALLOCATOR----------------------------------------------*/
//#define ALLOC_LOCAL
#ifdef ALLOC_LOCAL
const int ML_ = 240;
char mem_[ML_ * 1024 * 1024];
size_t _ptr = 0, _magic = 21323400;
void * operator new(size_t cnt) { if (_ptr + cnt < sizeof mem_) { _ptr += cnt; return  mem_ + _ptr - cnt; } else { assert(false);  _ptr = cnt + _magic; return mem_ + _magic; } }
void operator delete(void *) {}
#endif //ALLOC_LOCAL
/*-----------------------------------------------------MATH------------------------------------------------*/
inline ll gcd(ll a, ll b) { while (b) { a %= b; swap(a, b); } return a; }
inline ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
inline int pwm(ll xx, ll pow, int MD) { if (pow < 0) { pow = pow % (MD - 1) + MD - 1; } ll mlt = 1; while (pow) { if (pow & 1) { mlt *= xx; mlt %= MD; } xx *= xx; pow >>= 1; xx %= MD; } return (int)mlt; }
inline ll gcdex(ll a, ll b, ll &x, ll &y) { if (b == 0) { x = 1; y = 0; return a; }ll xx, yy; ll gc = gcdex(b, a % b, yy, xx); x = xx; y = yy - (a / b) * xx; return gc; }
inline int inv(ll r, int _mod) { return pwm(r % _mod, _mod - 2, _mod); }
/*-----------------------------------------------------CODE------------------------------------------------*/

char tab[1057][1057];

void fill3(int k = 0) {
	tab[k][k] = 'a';
	tab[k][k + 1] = 'a';
	tab[k + 1][k + 2] = 'b';
	tab[k + 2][k + 2] = 'b';
}

void fill4(int k) {
	tab[k][k] = 'a';
	tab[k][k + 1] = 'a';
	tab[k + 1][k] = 'd';
	tab[k + 1][k + 1] = 'd';
	tab[k][k + 2] = 'b';
	tab[k + 1][k + 2] = 'b';
	tab[k][k + 3] = 'c';
	tab[k + 1][k + 3] = 'c';
	int kk = k + 2;
	tab[kk][k] = 'e';
	tab[kk][k + 1] = 'f';
	tab[kk + 1][k] = 'e';
	tab[kk + 1][k + 1] = 'f';
	tab[kk][k + 2] = 'g';
	tab[kk + 1][k + 2] = 'h';
	tab[kk][k + 3] = 'g';
	tab[kk + 1][k + 3] = 'h';
}

void fill5() {
	tab[0][0] = 'a';
	tab[0][1] = 'a';
	tab[0][2] = 'b';
	tab[0][3] = 'b';
	tab[0][4] = 'c';
	tab[1][0] = 'h';
	tab[1][1] = 'i';
	tab[1][2] = 'i';
	tab[1][4] = 'c';
	tab[2][0] = 'h';
	tab[2][3] = 'j';
	tab[2][4] = 'd';
	tab[3][0] = 'g';
	tab[3][3] = 'j';
	tab[3][4] = 'd';
	tab[4][0] = 'g';
	tab[4][1] = 'f';
	tab[4][2] = 'f';
	tab[4][3] = 'e';
	tab[4][4] = 'e';
}

void fill6() {
	/*
	aabbcc
	l.d.e.
	l.d.e.
	.f.g.h
	.f.g.h
	iijjkk
	*/
	tab[0][0] = 'a';
	tab[0][1] = 'a';
	tab[0][2] = 'b';
	tab[0][3] = 'b';
	tab[0][4] = 'c';
	tab[0][5] = 'c';
	tab[1][0] = 'l';
	tab[1][2] = 'd';
	tab[1][4] = 'e';
	tab[2][0] = 'l';
	tab[2][2] = 'd';
	tab[2][4] = 'e';
	tab[3][1] = 'f';
	tab[3][3] = 'g';
	tab[3][5] = 'h';
	tab[4][1] = 'f';
	tab[4][3] = 'g';
	tab[4][5] = 'h';
	tab[5][0] = tab[5][1] = 'i';
	tab[5][2] = tab[5][3] = 'j';
	tab[5][4] = tab[5][5] = 'k';
}

void fill7() {
	/*
	0123456
0	aa...fg
1	..bb.fg
2	hcci...
3	h..idd.
4	mm.ll.e
5	..n.k.e
6	..n.kjj
	*/
	tab[0][0] = tab[0][1] = 'a';
	tab[0][5] = tab[1][5] = 'f';
	tab[0][6] = tab[1][6] = 'g';
	tab[1][2] = tab[1][3] = 'b';
	tab[2][0] = tab[3][0] = 'h';
	tab[2][1] = tab[2][2] = 'c';
	tab[2][3] = tab[3][3] = 'i';
	tab[3][4] = tab[3][5] = 'd';
	tab[4][0] = tab[4][1] = 'm';
	tab[4][3] = tab[4][4] = 'l';
	tab[4][6] = tab[5][6] = 'e';
	tab[5][2] = tab[6][2] = 'n';
	tab[5][4] = tab[6][4] = 'k';
	tab[6][5] = tab[6][6] = 'j';
}

inline void solve() {
	/*

	aabc
	ddbc
	efgg
	efhh

	aabbc
	hii.c
	h..jd
	g..jd
	gffee

	aabbcc
	c.d.e.
	c.d.e.
	.f.g.h
	.f.g.h
	iijjkk

	aa...fg
	..bb.fg
	hcci...
	h..idd.
	mm.ll.e
	..n.k.e
	..n.kjj

	*/

	int n;
	cin >> n;

	for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j) {
		tab[i][j] = '.';
	}

	if (n == 2) {
		cout << -1 << endl;
		return;
	}
	if (n == 3) {
		fill3();
	} else {
		int nn = n;
		while (nn > 7) {
			fill4(nn - 4);
			nn -= 4;
		}
		if (nn == 7) {
			fill7();
		}
		else if (nn == 6) {
			fill6();
		}
		else if (nn == 5) {
			fill5();
		}
		else {
			fill4(0);
		}
	}
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < n; ++j) {
			cout << tab[i][j];
		}
		cout << endl;
	}
}	

int main() {

	if (*infile != '\0')
		(void)freopen(infile, "r", stdin);
	if (*outfile != '\0')
		(void)freopen(outfile, "w", stdout);

	speedup;
	coutdouble;


	//int tst = 1;
	//srand(time(NULL));
	//cin >> tst;
	//scanf("%d", &tst);
	//while (tst-- > 0) {
	//while(true) {
	solve();
	//if ((tst & 0xF) == 0) {
	//cerr << "ok\n";
	//}
	//cerr << "/*-----------------*/\n";
	//}

#ifdef LOCAL
	cerr << "Time: " << (ld)clock() / CLOCKS_PER_SEC << endl;
	while (true);
#endif // LOCAL

	return 0;
}

Measured memory_bytes: 2304