#include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
//-------------------------------------------------------

int N;
string S[1010];
int nex;

string S13[]={
"bbddj........",
"ffh.j........",
"p.hnn........",
"pvr..........",
".vrxx........",
".....aaxy....",
".....bbxy....",
".......aaxy..",
".......bbxy..",
".........aaxy",
".........bbxy",
".....xy....aa",
".....xy....bb",
};
string S11[]={
"bbddff.....",
"ffhhj......",
"ll..j.v....",
"...x.zv....",
"...x.zf....",
"..b.d.f....",
"..b.djj....",
".......aaxy",
".......bbxy",
".......xyaa",
".......xybb",
};

char hoge(int y,int x) {
	return 'a'+(y+x)%26;
}

void add3(int y,int x) {
	S[y][x]=S[y][x+1]=hoge(y,x);
	S[y][x+2]=S[y+1][x+2]=hoge(y,x+2);
	S[y+2][x+2]=S[y+2][x+1]=hoge(y+2,x+2);
	S[y+2][x]=S[y+1][x]=hoge(y+2,x);
}
void add4(int y,int x) {
	S[y][x]=S[y][x+1]=hoge(y,x);
	S[y+1][x]=S[y+1][x+1]=hoge(y+1,x);
	S[y][x+2]=S[y+1][x+2]=hoge(y,x+2);
	S[y][x+3]=S[y+1][x+3]=hoge(y,x+3);
	S[y+2][x]=S[y+3][x]=hoge(y+2,x);
	S[y+2][x+1]=S[y+3][x+1]=hoge(y+2,x+1);
	S[y+2][x+2]=S[y+2][x+3]=hoge(y+2,x+2);
	S[y+3][x+2]=S[y+3][x+3]=hoge(y+3,x+2);
}
void add6(int y,int x) {
	S[y][x]=S[y][x+1]=hoge(y,x);
	S[y+1][x]=S[y+1][x+1]=hoge(y+1,x);
	S[y][x+2]=S[y+1][x+2]=hoge(y,x+2);
	S[y][x+3]=S[y+1][x+3]=hoge(y+1,x+2);

	S[y+2][x+2]=S[y+2][x+3]=hoge(y+2,x+2);
	S[y+3][x+2]=S[y+3][x+3]=hoge(y+3,x+2);
	S[y+2][x+4]=S[y+3][x+4]=hoge(y+2,x+4);
	S[y+2][x+5]=S[y+3][x+5]=hoge(y+2,x+5);
	S[y+4][x+4]=S[y+4][x+5]=hoge(y+4,x+4);
	S[y+5][x+4]=S[y+5][x+5]=hoge(y+5,x+4);
	S[y+4][x]=S[y+5][x]=hoge(y+4,x);
	S[y+4][x+1]=S[y+5][x+1]=hoge(y+4,x+1);
}
void add8(int y,int x) {
	add4(y,x);
	add4(y+4,x);
	add4(y,x+4);
	add4(y+4,x+4);
}
void add9(int y,int x) {
	int y2,x2;
	FOR(y2,3) FOR(x2,3) add3(y+y2*3,x+x2*3);
}

void add42(int y,int x,int N) {
	S[y][x%N]=S[y][(x+1)%N]=hoge(y,x%N);
	S[y+1][x%N]=S[y+1][(x+1)%N]=hoge(y+1,x%N);
	S[y][(x+2)%N]=S[y+1][(x+2)%N]=hoge(y,(x+2)%N);
	S[y][(x+3)%N]=S[y+1][(x+3)%N]=hoge(y,(x+3)%N);
}

void dfs(int y,int x,int LR,int UD) {
	if((y+x)%2==0) {
		dfs(y,x+1,LR,UD);
		return;
	}
	if(x>=N) y++,x=0;
	if(y==N) {
		if(LR==0 && UD==0) {
			int i;
			FOR(y,N) {
				set<char> SS;
				FOR(x,N) if(S[y][x]!='.') SS.insert(S[y][x]);
				if(SS.size()!=3) return;
				SS.clear();
				FOR(x,N) if(S[x][y]!='.') SS.insert(S[x][y]);
				if(SS.size()!=3) return;
			}
			
			FOR(y,N) cout<<S[y]<<endl;
			exit(0);
		}
		return;
	}
	int i;
	S[y][x]='a'+(y*5+x)%26;
	if(x&&S[y][x-1]=='.'&&LR) {
		S[y][x-1]=S[y][x];
		dfs(y,x+1,LR-1,UD);
		S[y][x-1]='.';
	}
	if(x+1<N&&S[y][x+1]=='.'&&LR) {
		S[y][x+1]=S[y][x];
		dfs(y,x+1,LR-1,UD);
		S[y][x+1]='.';
	}
	if(y&&S[y-1][x]=='.'&&UD) {
		S[y-1][x]=S[y][x];
		dfs(y,x+1,LR,UD-1);
		S[y-1][x]='.';
	}
	if(x+1<N&&S[y][x+1]=='.'&&UD) {
		S[y+1][x]=S[y][x];
		dfs(y,x+1,LR,UD-1);
		S[y+1][x]='.';
	}
	S[y][x]='.';
	dfs(y,x+1,LR,UD);
	
}

void solve() {
	int i,j,k,l,r,x,y; string s;
	
	cin>>N;
	FOR(y,N) S[y]=string(N,'.');
	
	//dfs(0,0,7,7);
	//return;
	
	if(N==5 || N==13) {
		FOR(y,N) cout<<S13[y].substr(0,N)<<endl;
		return;
	}
	if(N==7 || N==11) {
		FOR(y,N) cout<<S11[y].substr(0,N)<<endl;
		return;
	}
	
	if(N%3==0) {
		for(x=0;x<N;x+=3) add3(x,x);
		FOR(y,N) cout<<S[y]<<endl;
		return;
	}
	if(N>=4 && N%2==0) {
		int cur=0;
		FOR(y,N/2) {
			add42(cur,cur,N);
			cur+=2;
		}
		FOR(y,N) cout<<S[y]<<endl;
		return;
	}
	FOR(x,510) FOR(y,510) if(x>=3 && y>=4 && x*3+y*2==N) {
		int cur=0;
		FOR(j,y) {
			add42(cur,cur,y*2);
			add42(cur,cur+4,y*2);
			cur+=2;
		}
		FOR(j,x) {
			add3(cur,cur);
			add3(cur,(cur-y*2+3)%(x*3)+y*2);
			add3(cur,(cur-y*2+6)%(x*3)+y*2);
			cur+=3;
		}
		FOR(y,N) cout<<S[y]<<endl;
		return;
	}
	cout<<-1<<endl;
	
	
}


int main(int argc,char** argv){
	string s;int i;
	if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
	FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
	cout.tie(0); solve(); return 0;
}


Measured memory_bytes: 2304