#include <bits/stdc++.h>
// iostream is too mainstream
#include <cstdio>
// bitch please
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <cmath>
#include <iomanip>
#include <time.h>
#define dibs reserve
#define OVER9000 1234567890
#define ALL_THE(CAKE,LIE) for(auto LIE =CAKE.begin(); LIE != CAKE.end(); LIE++)
#define tisic 47
#define soclose 1e-8
#define chocolate win
// so much chocolate
#define patkan 9
#define ff first
#define ss second
#define abs(x) (((x) < 0)?-(x):(x))
#define uint unsigned int
#define dbl long double
#define pi 3.14159265358979323846
using namespace std;
// mylittledoge

using cat = long long;

#ifdef DONLINE_JUDGE
	// palindromic tree is better than splay tree!
	#define lld I64d
#endif

void strcpy(auto & S, string * p, int sz, int offset_r, int offset_c, int offset_val) {
	for(int k = 0; k < sz; k++) for(int l = 0; l < sz; l++) if(p[k][l] != '.')
		S[offset_r+k][offset_c+l] = p[k][l] + offset_val * 4;
}

int main() {
	cin.sync_with_stdio(0);
	cin.tie(0);
	cout << fixed << setprecision(10);
	int N;
	cin >> N;
	if(N == 2) {
		cout << "-1\n";
		return 0;
	}
	string p3[] = {
		"aab",
		"d.b",
		"dcc"
	};
	string p4[] = {
		"aacd",
		"bbcd",
		"cdaa",
		"cdbb"
	};
	string p5[] = {
		"aabba",
		"b.cca",
		"bd..b",
		"ad..b",
		"abbaa",
	};
	string p7[] = {
		"....aba",
		"....aba",
		"....bab",
		"....bab",
		"aabb.cc",
		"bbaad..",
		"aabbd..",
	};
	vector<string> S(N);
	for(int i = 0; i < N; i++) for(int j = 0; j < N; j++) S[i] += '.';
	int r = 1;
	while(N%2 == 0 && N >= 6) N /= 2, r *= 2;
	for(int rr = 0; rr < r; rr++) for(int rc = 0; rc < r; rc++) {
		int n = N;
		while(n >= 8 || n == 4) {
			n -= 4;
			strcpy(S, p4, 4, rr*N+n, rc*N+n, (rr+rc)%2);
		}
		if(n == 3) strcpy(S, p3, 3, rr*N, rc*N, (rr+rc)%2);
		if(n == 5) strcpy(S, p5, 5, rr*N, rc*N, (rr+rc)%2);
		if(n == 7) strcpy(S, p7, 7, rr*N, rc*N, (rr+rc)%2);
	}
	for(int i = 0; i < r*N; i++) cout << S[i] << "\n";
	return 0;
}

// look at my code
// my code is amazing

#pragma region

#include "bits/stdc++.h"
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define _rep3(i, begin, end) for (register int i = (begin); i < (end); i++)
#define _irep3(i, begin, end) for (register int i = (end)-1; i >= (begin); i--)
#define _rep2(i, n) _rep3(i, 0, n)
#define _irep2(i, n) _irep3(i, 0, n)
#define _overload3(_1, _2, _3, name, ...) name
#define rep(...) _overload3(__VA_ARGS__, _rep3, _rep2, )(__VA_ARGS__)
#define irep(...) _overload3(__VA_ARGS__, _irep3, _irep2, )(__VA_ARGS__)
#define out(x) cout << (x) << '\n';
#define debug(x) cerr << #x << " = " << (x) << " (line: " << __LINE__ << ") " << endl;
typedef long long ll;

template <typename T>
istream &operator>>(istream &is, vector<T> &vec) {
  for (auto &v : vec) is >> v;
  return is;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &vec) {
  os << "vec[ ";
  rep(i, vec.size()) i == 0 ? os << vec[i] : os << ", " << vec[i];
  os << " ]";
  return os;
}

#pragma endregion

#define MOD 1000000007
#define INF 2147483647

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(16);

  ll N;
  cin >> N;
  if (N == 2) {
    out(-1);
    return 0;
  }
  if (N == 3) {
    out("abb");
    out("a.a");
    out("bba");
    return 0;
  }
  if (N == 4) {
    out("abaa");
    out("abcc");
    out("ccba");
    out("aaba");
    return 0;
  }
  vector<string> ans(N, string(N, '.'));
  ans[0][0] = 'c';
  ans[0][1] = 'c';
  ans[1][0] = 'd';
  ans[2][0] = 'd';
  ans[0][N - 1] = 'c';
  ans[1][N - 1] = 'c';
  ans[0][N - 2] = 'd';
  ans[0][N - 3] = 'd';
  ans[N - 1][N - 1] = 'c';
  ans[N - 1][N - 2] = 'c';
  ans[N - 2][N - 1] = 'd';
  ans[N - 3][N - 1] = 'd';
  ans[N - 1][0] = 'c';
  ans[N - 2][0] = 'c';
  ans[N - 1][1] = 'd';
  ans[N - 1][2] = 'd';
  rep(i, N - 4) {
    char c = i % 2 == 0 ? 'a' : 'b';
    ans[i + 1][i + 2] = c;
    ans[i + 1][i + 3] = c;
    ans[i + 2][i + 1] = c;
    ans[i + 3][i + 1] = c;
  }
  rep(i, N) out(ans[i]);
}
