#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"
#include "ctime"

using namespace std;

constexpr long long int MOD = 1000000007;
//constexpr int MOD = 1000000007;
//constexpr int MOD = 998244353;
//constexpr long long int MOD = 998244353;
constexpr double EPS = 1e-8;

//int N, M, K, H, W, L, R;
long long int N, M, K, H, W, L, R;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	cin>>N;
	//assert(N!=7);
	//assert(N!=19);
	if(N%3==0){
		vector<string>ans(3,string(3,'.'));
		ans[0]="aab";
		ans[1]="d.b";
		ans[2]="dcc";
		for(int i=0;i<N;i++){
			for(int j=0;j<N;j++){
				cout<<ans[i%3][j%3];
			}
			cout<<endl;
		}
		return 0;
	}
	else if(N%4==0){
		vector<string>ans(4,string(4,'.'));
		ans[0]="abcc";
		ans[1]="abdd";
		ans[2]="eegh";
		ans[3]="ffgh";
		for(int i=0;i<N;i++){
			for(int j=0;j<N;j++){
				cout<<ans[i%4][j%4];
			}
			cout<<endl;
		}
		return 0;
	}
	for(int i=N;i>=0;i-=9){
		vector<string>ans3(3,string(3,'.'));
		ans3[0]="aa.";
		ans3[1]="..b";
		ans3[2]="..b";
		vector<string>ans4(4,string(4,'.'));
		ans4[0]="abcc";
		ans4[1]="abdd";
		ans4[2]="eegh";
		ans4[3]="ffgh";
		vector<string>ret(N,string(N,'.'));
		if(i%4==0){
			int dif=N-i;
			for(int j=0;j<dif;j++){
				for(int k=j/9*9;k<j/9*9+9;k++){
					ret[j][k]=ans3[j%3][k%3];
				}
			}
			for(int j=0;j<i;j++){
				for(int k=j/4*4;k<j/4*4+4;k++){
					ret[dif+j][dif+k]=ans4[j%4][k%4];
				}
			}
			for(auto j:ret){
				cout<<j<<endl;
			}
			return 0;
		}
	}
	for(int i=N;i>=0;i-=6){
		vector<string>ans6(6,string(6,'.'));
		ans6[0]="ee.aab";
		ans6[1]="..fc.b";
		ans6[2]="..fcdd";
		ans6[3]="aabee.";
		ans6[4]="c.b..f";
		ans6[5]="cdd..f";
		vector<string>ans4(4,string(4,'.'));
		ans4[0]="abcc";
		ans4[1]="abdd";
		ans4[2]="eegh";
		ans4[3]="ffgh";
		vector<string>ret(N,string(N,'.'));
		if(i%4==0){
			int dif=N-i;
			for(int j=0;j<dif;j++){
				for(int k=j/6*6;k<j/6*6+6;k++){
					ret[j][k]=ans6[j%6][k%6];
				}
			}
			for(int j=0;j<i;j++){
				for(int k=j/4*4;k<j/4*4+4;k++){
					ret[dif+j][dif+k]=ans4[j%4][k%4];
				}
			}
			for(auto j:ret){
				cout<<j<<endl;
			}
			return 0;
		}
		if(i%5==0){
			vector<string>ans5(5,string(5,'.'));
			ans5[0]="aabbc";
			ans5[1]="d.eec";
			ans5[2]="df.gg";
			ans5[3]=".fh.i";
			ans5[4]="jjh.i";
			int dif=N-i;
			for(int j=0;j<dif;j++){
				for(int k=j/6*6;k<j/6*6+6;k++){
					ret[j][k]=ans6[j%6][k%6];
				}
			}
			for(int j=0;j<i;j++){
				for(int k=j/5*5;k<j/5*5+5;k++){
					ret[dif+j][dif+k]=ans5[j%5][k%5];
				}
			}
			for(auto j:ret){
				cout<<j<<endl;
			}
			return 0;
		}
		if(N==7){
			ans6[0]="aa.aa.";
			ans6[1]="..b..b";
			ans6[2]="..b..b";
			ans6[3]="aa.aa.";
			ans6[4]="..b..b";
			ans6[5]="..b..b";
			int dif=N-1;
			for(int j=0;j<dif;j++){
				for(int k=j/6*6;k<j/6*6+6;k++){
					ret[j][k]=ans6[j%6][k%6];
				}
			}
			for(int j=N-7;j<N-1;j+=2){
				if(j%4)ret[N-1][j]=ret[N-1][j+1]=ret[j][N-1]=ret[j+1][N-1]='c';
				else ret[N-1][j]=ret[N-1][j+1]=ret[j][N-1]=ret[j+1][N-1]='d';
			}
			for(auto j:ret){
				cout<<j<<endl;
			}
			return 0;
		}
	}
	if(N==19){
		vector<string>ans(N,string(N,'.'));
		ans[0]="aabbc..............";
		ans[1]="d.eec..............";
		ans[2]="df.gg..............";
		ans[3]=".fh.i..............";
		ans[4]="jjh.i..............";
		ans[5]=".....aabbc.........";
		ans[6]=".....d.eec.........";
		ans[7]=".....df.gg.........";
		ans[8]="......fh.i.........";
		ans[9]=".....jjh.i.........";
		ans[10]="..........aabbc....";
		ans[11]="..........d.eec....";
		ans[12]="..........df.gg....";
		ans[13]="...........fh.i....";
		ans[14]="..........jjh.i....";
		ans[15]="...............abcc";
		ans[16]="...............abdd";
		ans[17]="...............eegh";
		ans[18]="...............ffgh";
		for(auto i:ans)cout<<i<<endl;
		return 0;
	}
	//bool flag=true;
	cout<<-1<<endl;
}

Measured memory_bytes: 2304