#include <bits/stdc++.h>
using namespace std;
typedef pair < int , int > pii;
typedef pair < pii , pii > p4i;
typedef long long LL;
#define mpr make_pair
#define FS first
#define SC second
#define PB push_back
template < typename T > T MAX(T a,T b){return (a>b)?a:b;}
template < typename T > T MIN(T a,T b){return (a<b)?a:b;}
template < typename T > void UMAX(T &a,T b){a=(a>b?a:b);}
template < typename T > void UMIN(T &a,T b){a=(a<b?a:b);}
int readint(){
	char c=getchar();
	int ret=0;
	while(!(c>='0' && c<='9')) c=getchar();
	while(c>='0' && c<='9'){
		ret=ret*10+c-'0';
		c=getchar();
	}
	return ret;
}
void putint(int v){
	if(!v){
		putchar('0');
		return;
	}
	if(v>=10) putint(v/10);
	putchar('0'+(v%10));
}
int n;
vector < p4i > res;
void calc(int xl,int xr,int yl,int yr,bool SP=0){
	int n=xr-xl+1;
	vector < p4i > ret;
	if(n==3 && SP){
		ret.push_back(mpr(mpr(0,0),mpr(1,0)));
		ret.push_back(mpr(mpr(2,1),mpr(2,2)));
	}
	else if(n==3 && !SP){
		ret.push_back(mpr(mpr(0,0),mpr(1,0)));
		ret.push_back(mpr(mpr(2,0),mpr(2,1)));
		ret.push_back(mpr(mpr(2,2),mpr(1,2)));
		ret.push_back(mpr(mpr(0,2),mpr(0,1)));
	}
	else if(n==5){
		ret.push_back(mpr(mpr(1,1),mpr(2,1)));
		ret.push_back(mpr(mpr(3,2),mpr(3,3)));
		
		ret.push_back(mpr(mpr(0,0),mpr(1,0)));
		ret.push_back(mpr(mpr(2,0),mpr(3,0)));
		ret.push_back(mpr(mpr(4,0),mpr(4,1)));
		ret.push_back(mpr(mpr(4,2),mpr(4,3)));
		ret.push_back(mpr(mpr(4,4),mpr(3,4)));
		ret.push_back(mpr(mpr(2,4),mpr(1,4)));
		ret.push_back(mpr(mpr(0,4),mpr(0,3)));
		ret.push_back(mpr(mpr(0,2),mpr(0,1)));
	}
	else if(n==6){
		calc(xl,xl+2,yl,yl+2,0);
		calc(xl+3,xl+5,yl+3,yl+5,0);
		calc(xl+3,xl+5,yl,yl+2,1);
		calc(xl,xl+2,yl+3,yl+5,1);
	}
	else if(n==7){
		ret.push_back(mpr(mpr(0,0),mpr(1,0)));
		ret.push_back(mpr(mpr(0,1),mpr(1,1)));
		ret.push_back(mpr(mpr(2,2),mpr(3,2)));
		ret.push_back(mpr(mpr(2,4),mpr(3,4)));
		ret.push_back(mpr(mpr(0,3),mpr(0,4)));
		ret.push_back(mpr(mpr(1,4),mpr(1,5)));
		ret.push_back(mpr(mpr(2,5),mpr(2,6)));
		ret.push_back(mpr(mpr(3,6),mpr(4,6)));
		ret.push_back(mpr(mpr(5,6),mpr(6,6)));
		ret.push_back(mpr(mpr(4,5),mpr(5,5)));
		ret.push_back(mpr(mpr(4,2),mpr(4,3)));
		ret.push_back(mpr(mpr(5,0),mpr(5,1)));
		ret.push_back(mpr(mpr(6,0),mpr(6,1)));
		ret.push_back(mpr(mpr(6,2),mpr(6,3)));
	}
	else if(n==8){
		ret.push_back(mpr(mpr(1,0),mpr(2,0)));
		ret.push_back(mpr(mpr(3,0),mpr(4,0)));
		ret.push_back(mpr(mpr(5,0),mpr(6,0)));
		ret.push_back(mpr(mpr(0,1),mpr(0,2)));
		ret.push_back(mpr(mpr(0,3),mpr(0,4)));
		ret.push_back(mpr(mpr(0,5),mpr(0,6)));
		ret.push_back(mpr(mpr(1,7),mpr(2,7)));
		ret.push_back(mpr(mpr(3,7),mpr(4,7)));
		ret.push_back(mpr(mpr(5,7),mpr(6,7)));
		ret.push_back(mpr(mpr(7,1),mpr(7,2)));
		ret.push_back(mpr(mpr(7,3),mpr(7,4)));
		ret.push_back(mpr(mpr(7,5),mpr(7,6)));
		ret.push_back(mpr(mpr(1,1),mpr(1,2)));
		ret.push_back(mpr(mpr(2,3),mpr(3,3)));
		ret.push_back(mpr(mpr(4,4),mpr(4,5)));
		ret.push_back(mpr(mpr(5,6),mpr(6,6)));
	}
	int i;
	for(i=0;i<(int)ret.size();++i){
		ret[i].FS.FS+=xl;
		ret[i].SC.FS+=xl;
		ret[i].FS.SC+=yl;
		ret[i].SC.SC+=yl;
		res.push_back(ret[i]);
	}
}
char s[1005][1005];
int main(){
	int i,j,k;
	int n,t;
	scanf("%d",&n);
	t=n;
	vector < int > dc;
	if(n==4){
		printf("abcc\nabdd\neefg\nhhfg\n");
		return 0;
	}
	if(n%3==0){
		while(t){
			dc.push_back(3);
			t-=3;
		}
	}
	else if(n%3==1){
		if(n<7){
			printf("-1\n");
			return 0;
		}
		else if((n-7)/3%2==1){
			dc.push_back(5);
			dc.push_back(5);
			t-=10;
			while(t){
				dc.push_back(6);
				t-=6;
			}
		}
		else{
			dc.push_back(7);
			t-=7;
			while(t){
				dc.push_back(6);
				t-=6;
			}
		}
	}
	else{
		if(n<5){
			printf("-1\n");
			return 0;
		}
		if((n-5)/3%2==0){
			dc.push_back(5);
			t-=5;
			while(t){
				dc.push_back(6);
				t-=6;
			}
		}
		else{
			dc.push_back(8);
			t-=8;
			while(t){
				dc.push_back(6);
				t-=6;
			}
		}
	}
	int cur=0;
	for(i=0;i<(int)dc.size();++i){
		calc(cur,cur+dc[i]-1,cur,cur+dc[i]-1);
		cur+=dc[i];
	}
	for(i=0;i<n;++i){
		for(j=0;j<n;++j){
			s[i][j]='.';
		}
	}
	for(i=0;i<(int)res.size();++i){
		char c='a'+(i%26);
		s[res[i].FS.FS][res[i].FS.SC]=s[res[i].SC.FS][res[i].SC.SC]=c;
	}
	for(i=0;i<n;++i){
		for(j=0;j<n;++j){
			printf("%c",s[i][j]);
		}
		printf("\n");
	}
	return 0;
}
/*
 * 代码框架
 * 1. 实现给定子矩形，返回vector
 * 2. %3=0则直接用3拼，=1则-=7再拼，=2则-=5再拼
*/

Measured memory_bytes: 2304