//by yjz
#include<bits/stdc++.h>
#define FF first
#define SS second
#define MP make_pair
#define PB push_back
typedef long long ll;
using namespace std;
string s3[3] = {
"aab",
"c.b",
"cdd"};
string s4[4] =
{"aacd",
 "bbcd",
 "cdaa",
 "cdbb"};
string s5[5] =
{"..abc",
 "..abc",
 "ffeed",
 "ggj.d",
 "hhjkk"};
string s7[7] = 
{"....cba",
 "....cba",
 "....def",
 "....def",
 "hhii..g",
 "jjkk..g",
 "llmmnn."};

int n;
char ans[1011][1011];
int B = 1;
void add(string s[], int k)
{
	for (int i=0; i<k; i++) for (int j=0; j<k; j++) ans[B+i][B+j] = s[i][j];
	B += k;
}
int main()
{
	cin>>n;
	if (n%2==0&&n>2)
	{
		for (int i=1; i<=n/2; i++)
		{
			int x = i;
			ans[x+x-1][x+x-1] = ans[x+x-1][x+x] = 'a';
			ans[x+x][x+x-1] = ans[x+x][x+x] = 'b';
		}
		for (int i=1; i<=n/2; i++)
		{
			int x = i;
			int c = (x+x)%n+1;
			ans[x+x-1][c] = ans[x+x][c] = 'c';
			ans[x+x-1][c+1] = ans[x+x][c+1] = 'd';
		}
		for (int i=1; i<=n; i++)
		{
			for (int j=1; j<=n; j++)
			{
				if (!ans[i][j]) putchar('.');
				else putchar(ans[i][j]);
			}
			puts("");
		}
	}
	else if (n%3==0)
	{
		for (int i=0; i<n; i++)
		{
			for (int j=0; j<n; j++)
			{
				if (i/3==j/3) putchar(s3[i%3][j%3]);
				else putchar('.');
			}
			puts("");
		}
	}
	else
	{
		for (int i=0; i<=n; i++)
		{
			for (int j=0; j<=n; j++)
			{
				if (n>=4*i+5*j&&(n-4*i-5*j)%7==0)
				{
					int t = (n-4*i-5*j)/7;
					while (i--) add(s4, 4);
					while (j--) add(s5, 5);
					while (t--) add(s7, 7);
					for (int i=1; i<=n; i++)
					{
						for (int j=1; j<=n; j++)
						{
							if (!ans[i][j]) putchar('.');
							else putchar(ans[i][j]);
						}
						puts("");
					}
					return 0;
				}
			}
		}
		assert(n==2);
		puts("-1");
	}
	return 0;
}