#include <iostream>
#include <algorithm>
#include <cmath>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <string.h>
#include <stack>
#include <assert.h>
#include <bitset>
#define Endl endl
#define mp make_pair
#define ll long long 
#define pii pair<int,int>
#define pll pair<ll,ll>
#define over(A) {cout<<A<<endl;exit(0);}
#define all(A) A.begin(),A.end()
#define ceil(a,b) ((a-1)/b+1)
#define srand() mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define rand(l,r) uniform_int_distribution<int>(l,r)(rng)
typedef unsigned long long ull;
const int inf=1039074182;
using namespace std;
bool use[15][15];
int co[15][15];
int lie[15];
int hang[15];
const int dx[]={0,1,0,-1};
const int dy[]={1,0,-1,0};
const int d2x[]={-1,-1,0,1};
const int d2y[]={1,0,-1,-1};
char c[1005][1005];
int n;
int goal;
const set <char> alphabet={'a','b','c','d','e','f','g'};
bool flag;

inline bool out(int x,int y)
{
	if(x<0 || y<0 || x>=n || y>=n) return true;else return false;
}

void print()
{
	int _n=n;
	n=n%4+4;
	int num=0;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(co[i][j]==-1) c[i][j]='.';
			else if(co[i][j]>i*n+j)
			{
				c[i][j]='a'+(num++);
//				set <char> squ=alphabet;
//				for(int k=0;k<4;k++)
//				{
//					if(out(d2x[k]+i,d2y[k]+j)) continue;
//					squ.erase(c[d2x[k]+i][d2y[k]+j]);
//				}
//				c[i][j]=*squ.begin();
			}
			else
			{
				c[i][j]=c[co[i][j]/n][co[i][j]%n];
			}
		}
	}
	swap(_n,n);
	for(int k=_n;k<n;k+=4)
	{
		c[k][k+0]='a';
		c[k][k+1]='a';
		c[k][k+2]='b';
		c[k][k+3]='c';
		c[k+1][k]='d';
		c[k+1][k+1]='d';
		c[k+1][k+2]='b';
		c[k+1][k+3]='c';
		c[k+2][k]='g';
		c[k+2][k+1]='a';
		c[k+2][k+2]='e';
		c[k+2][k+3]='e';
		c[k+3][k]='g';
		c[k+3][k+1]='a';
		c[k+3][k+2]='f';
		c[k+3][k+3]='f';
	}
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(c[i][j]==0) cout<<'.';else cout<<c[i][j];
		}
		cout<<endl;
	}
	cout<<endl;
}

void dfs(int id)
{
	int x=id/n;
	int y=id%n;
	if(hang[x]>goal) return;
	if(lie[y]>goal) return;
	if(hang[x]+n-y<goal) return;
	if(lie[y]+n-x<goal) return;
	if(y==0 && x)
	{
		if(hang[x-1]!=goal) return;
	}
	if(x==n-1 && y)
	{
		if(lie[y-1]!=goal) return;
	}
	if(x==n)
	{
		if(lie[n-1]!=goal) return;
		flag=true;
		return;
	}
	if(use[x][y])
	{
		dfs(id+1);
	}
	else
	{
		if(y!=n-1 && !use[x][y+1])
		{
			use[x][y]=use[x][y+1]=true;
			co[x][y]=id+1;
			co[x][y+1]=id;
			lie[y]++;
			lie[y+1]++;
			hang[x]++;
			dfs(id+1);
			if(flag) return;
			lie[y]--;
			lie[y+1]--;
			hang[x]--;
			co[x][y]=-1;
			co[x][y+1]=-1;
			use[x][y]=use[x][y+1]=false;
		}
		if(x!=n-1)
		{
			use[x][y]=use[x+1][y]=true;
			co[x][y]=id+n;
			co[x+1][y]=id;
			hang[x]++;
			lie[y]++;
			hang[x+1]++;
			dfs(id+1);
			if(flag) return;
			lie[y]--;
			hang[x+1]--;
			hang[x]--;
			co[x][y]=-1;
			co[x+1][y]=-1;
			use[x][y]=use[x+1][y]=false;
		}
		dfs(id+1);
		if(flag) return;
	}
}

int main()
{
//	freopen("input.txt","r",stdin);
	ios_base::sync_with_stdio(false);
	cin>>n;
	if(n<4)
	{
		if(n==2)
		{
			cout<<-1<<endl;
			return 0;
		}
		if(n==3)
		{
			cout<<"aab\nd.b\ndcc\n";
			return 0;
		}
	}
	memset(co,-1,sizeof(co));
	goal=3;
	int _n=n;
	n=n%4+4;
	dfs(0);
	swap(_n,n);
	print();
//	int maxn=((n*n)/2)*3/(2*n);
//	for(goal=3;goal<=3;goal++)
//	{
//		dfs(0);
//	}
	return 0;
}

Measured memory_bytes: 2176