#include<bits/stdc++.h>
#define randome_generate srand(std::chrono::high_resolution_clock::now().time_since_epoch().count())
using namespace std;
int n;
char mb3[4][4]={
	{".aa"},
	{"a.."},
	{"a.."}
};
char mb4[5][5]={
	{"aabc"},
	{"ccbc"},
	{"badd"},
	{"bacc"}
};
char mb5[6][6]={
	{"aabba"},
	{".bc.a"},
	{"cbc.."},
	{"c.dbb"},
	{"aadcc"}
};
char mb6[7][7]={
	{"caac.."},
	{"c..caa"},
	{"baab.."},
	{"b..baa"},
	{"caac.."},
	{"c..caa"}
};
char mb7[8][8]={
	{"aabbcc."},
	{"dd.dd.a"},
	{"..d..da"},
	{"..d..db"},
	{"dd.dd.b"},
	{"..d..dc"},
	{"..d..dc"}
};
char canvas[1200][1200];
void paint3(int x,int y){
	for(int i=0;i<3;i++)
		for(int j=0;j<3;j++)
			canvas[i+x][j+y]=mb3[i][j];
}
void paint4(int x,int y){
	for(int i=0;i<4;i++)
		for(int j=0;j<4;j++)
			canvas[i+x][j+y]=mb4[i][j];
}
void paint5(int x,int y){
	for(int i=0;i<5;i++)
		for(int j=0;j<5;j++)
			canvas[i+x][j+y]=mb5[i][j];
}
void paint6(int x,int y){
	for(int i=0;i<6;i++)
		for(int j=0;j<6;j++)
			canvas[i+x][j+y]=mb6[i][j];
}
void paint7(int x,int y){
	for(int i=0;i<7;i++)
		for(int j=0;j<7;j++)
			canvas[i+x][j+y]=mb7[i][j];
}
void painter(int id,int x,int y){
	if(id==3)
		paint3(x,y);
	if(id==4)
		paint4(x,y);
	if(id==5)
		paint5(x,y);
	if(id==6)
		paint6(x,y);
	if(id==7)
		paint7(x,y);
}
int main(){
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	cin>>n;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++)
			canvas[i][j]='.';
	}
	if(n==2){
		cout<<-1<<endl;
		return 0;
	}
	if(n==3){
		cout<<".aa"<<endl;
		cout<<"a.."<<endl;
		cout<<"a.."<<endl;
		return 0;
	}
	int x=n/4-1;
	int y=n-x*4;
	int xx=1,yy=1;
	for(int i=1;i<=x;i++){
		painter(4,xx,yy);
		xx+=4;
		yy+=4;
	}
	painter(y,xx,yy);
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++)
			cout<<canvas[i][j];
		cout<<endl;
	}
	return 0;
}
