//~ while (clock()<=69*CLOCKS_PER_SEC)
//~ #pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("O3")
//~ #pragma GCC optimize("Ofast")
//~ #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//~ #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;

template <typename T>
using ordered_set =
    tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

#define shandom_ruffle random_shuffle

using ll=long long;
using pii=pair<int,int>;
using pll=pair<ll,ll>;
using vi=vector<int>;
using vll=vector<ll>;
const int nax=1007;

int n;


int iler[nax];
int ilek[nax];
int tab[nax][nax];

int kt;

int mam;
char zap[10][100][100];
char wyp[nax][nax];

int dp[nax];

void rek(int a, int b)
{
	if (mam)
		return;
	if (a>1)
	{
		for (int i=1; i<=n; i++)
			if (ilek[i]>iler[1])
				return;
	}
	if (b==n+1)
	{
		if (a==1 && !iler[1])
			return;
		if (a>1 && iler[a]!=iler[1])
			return;
		rek(a+1, 1);
		return;
	}
	if (a==n+1)
	{
		if (iler[1]!=3)
			return;
		for (int i=1; i<=n; i++)
			if (iler[i]!=iler[1])
				return;
		for (int i=1; i<=n; i++)
			if (ilek[i]!=iler[1])
				return;
		for (int i=1; i<=n; i++)
		{
			for (int j=1; j<=n; j++)
			{
				if (!tab[i][j])
					zap[n][i][j]='.';
				else
					zap[n][i][j]=(tab[i][j]-1+'a');
			}
		}
		mam=1;
		return;
	}
	rek(a, b+1);
	if (a<n && !tab[a][b] && !tab[a+1][b])
	{
		kt++;
		tab[a][b]=tab[a+1][b]=kt;
		iler[a]++;
		iler[a+1]++;
		ilek[b]++;
		rek(a, b+1);
		iler[a]--;
		iler[a+1]--;
		ilek[b]--;
		tab[a][b]=tab[a+1][b]=0;
		kt--;
	}
	if (b<n && !tab[a][b] && !tab[a][b+1])
	{
		kt++;
		tab[a][b]=tab[a][b+1]=kt;
		iler[a]++;
		ilek[b+1]++;
		ilek[b]++;
		rek(a, b+1);
		iler[a]--;
		ilek[b+1]--;
		ilek[b]--;
		tab[a][b]=tab[a][b+1]=0;
		kt--;
	}
}

int main()
{
	for (int i=4; i<=7; i++)
	{
		n=i;
		mam=0;
		rek(1, 1);
	}
	scanf("%d", &n);
	if (n<=2)
	{
		printf("-1\n");
		return 0;
	}
	if (n==3)
	{
		printf("aab\n");
		printf("d.b\n");
		printf("dcc\n");
		return 0;
	}
	dp[0]=1;
	for (int i=1; i<=n; i++)
	{
		for (int j=4; j<=7; j++)
			if (j<=i)
				dp[i]|=dp[i-j];
	}
	int pn=n;
	for (int i=1; i<=n; i++)
		for (int j=1; j<=n; j++)
			wyp[i][j]='.';
	while(n)
	{
		for (int i=4; i<=7; i++)
		{
			if (dp[n-i])
			{
				int s=n-i;
				for (int j=1; j<=i; j++)
					for (int l=1; l<=i; l++)
						wyp[s+j][s+l]=zap[i][j][l];
				n=s;
				break;
			}
		}
	}
	
	
	
	
	for (int i=1; i<=pn; i++)
	{
		for (int j=1; j<=pn; j++)
			printf("%c", wyp[i][j]);
		printf("\n");
	}
	return 0;
}


Measured memory_bytes: 2304