#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#ifndef print
#define print(...)
#define trace(...)
#define endl '\n'
#endif
#define pb push_back
#define fi first
#define se second
#define int long long
typedef long long ll;
typedef long double f80;
#define double long double
#define pii pair<int,int>
#define pll pair<ll,ll>
#define sz(x) ((long long)x.size())
#define fr(a,b,c) for(int a=b; a<=c; a++)
#define rep(a,b,c) for(int a=b; a<c; a++)
#define trav(a,x) for(auto &a:x)
#define all(con) con.begin(),con.end()
const ll infl = 0x3f3f3f3f3f3f3f3fLL;
const int infi = 0x3f3f3f3f;
//const int mod=998244353;
const int mod = 1000000007;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> oset;
auto clk = clock();
mt19937_64 rang(chrono::high_resolution_clock::now().time_since_epoch().count());
int rng(int lim) { uniform_int_distribution<int> uid(0, lim - 1); return uid(rang); }
int powm(int a, int b) { int res = 1; while (b) { if (b & 1) res = (res * a) % mod; a = (a * a) % mod; b >>= 1; } return res; }

char ch[1005][1005];
char cc = 'a';
void pl(int i, int j) {
	ch[i][j] = cc;
	ch[i][j + 1] = cc;
	cc++;
}
void pr(int i, int j) {
	ch[i][j] = cc;
	ch[i + 1][j] = cc;
	cc++;
}

int32_t main() {
	ios::sync_with_stdio(false); cin.tie(NULL); cout.precision(10); srand(chrono::high_resolution_clock::now().time_since_epoch().count());
	int n; cin >> n;
	if (n == 3) {
		cout << "aa.\n..b\n..b" << '\n';
	} else if (n <= 2) {
		cout << -1 << '\n';
	} else if (n == 7) {
		pl(1, 4);
		pl(1, 6);
		pl(2, 5);
		pl(3, 5);
		pl(4, 2);
		pl(7, 1);
		pl(7, 3);

		pr(1, 1);
		pr(3, 1);
		pr(5, 2);
		pr(5, 3);
		pr(2, 4);
		pr(4, 7);
		pr(6, 7);
		for (int i = 1; i <= n; ++i) {
			for (int j = 1; j <= n; ++j) {
				cout << (ch[i][j] ? ch[i][j] : '.');
			}
			cout << '\n';
		}

	} else if (!(n & 1)) {
		for (int i = 1; i <= n; i += 2) {
			ch[i][i] = 'a';
			ch[i + 1][i] = 'a';
			ch[i][i + 1] = 'b';
			ch[i + 1][i + 1] = 'b';

			ch[(i + 1) % n + 1][i] = 'c';
			ch[(i + 1) % n + 1][i + 1] = 'c';
			ch[(i + 2) % n + 1][i] = 'd';
			ch[(i + 2) % n + 1][i + 1] = 'd';
		}
		for (int i = 1; i <= n; ++i) {
			for (int j = 1; j <= n; ++j) {
				cout << (ch[i][j] ? ch[i][j] : '.');
			}
			cout << '\n';
		}
	} else {
		n -= 5;
		for (int i = 1; i <= n; i += 2) {
			ch[i][i] = 'a';
			ch[i + 1][i] = 'a';
			ch[i][i + 1] = 'b';
			ch[i + 1][i + 1] = 'b';

			ch[(i + 1) % n + 1][i] = 'c';
			ch[(i + 1) % n + 1][i + 1] = 'c';
			ch[(i + 2) % n + 1][i] = 'd';
			ch[(i + 2) % n + 1][i + 1] = 'd';
		}
		ch[1 + n][1 + n] = 'a';
		ch[2 + n][1 + n] = 'a';
		ch[1 + n][2 + n] = 'b';
		ch[1 + n][3 + n] = 'b';
		ch[1 + n][4 + n] = 'c';
		ch[1 + n][5 + n] = 'c';
		ch[2 + n][3 + n] = 'd';
		ch[3 + n][3 + n] = 'd';
		ch[2 + n][4 + n] = 'e';
		ch[2 + n][5 + n] = 'e';
		ch[3 + n][1 + n] = 'f';
		ch[4 + n][1 + n] = 'f';
		ch[3 + n][2 + n] = 'g';
		ch[4 + n][2 + n] = 'g';
		ch[5 + n][1 + n] = 'h';
		ch[5 + n][2 + n] = 'h';
		ch[5 + n][3 + n] = 'i';
		ch[5 + n][4 + n] = 'i';
		ch[4 + n][5 + n] = 'j';
		ch[5 + n][5 + n] = 'j';
		n += 5;
		for (int i = 1; i <= n; ++i) {
			for (int j = 1; j <= n; ++j) {
				cout << (ch[i][j] ? ch[i][j] : '.');
			}
			cout << '\n';
		}
	}
}

Measured memory_bytes: 2176