#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
using namespace std;
typedef long long LL;

char g[1005][1005] = {0};
string c[10][10];
LL n;

void init(){
	c[3][0] = "aa.";
	c[3][1] = "..b";
	c[3][2] = "..b";
	
	c[4][0] = "aabc";
	c[4][1] = "ddbc";
	c[4][2] = "efgg";
	c[4][3] = "efhh";
	
	c[5][0] = "aabbc";
	c[5][1] = "dee.c";
	c[5][2] = "d..fg";
	c[5][3] = "h..fg";
	c[5][4] = "hiijj";
	
	c[7][0] = "aabbcc.";
	c[7][1] = "gg.gg.d";
	c[7][2] = "..g..gd";
	c[7][3] = "..g..ge";
	c[7][4] = "gg.gg.e";
	c[7][5] = "..g..gf";
	c[7][6] = "..g..gf";
}

LL cov(LL x,LL y,LL id){
	for(LL i = 0;i < id;i ++){
		for(LL j = 0;j < id;j ++){
			g[x + i][y + j] = c[id][i][j];
		}
	}
}

void solve(LL x,LL y){
	if(x == -1){
		if(y == 2){ cout << -1 << endl; return; }
		if(y == 3) cov(1,1,3);
		if(y == 6){ cov(1,1,3); cov(4,4,3); }
		if(y == 5) cov(1,1,5);
		if(y == 7) cov(1,1,7);
		if(y == 11){ cov(1,1,4); cov(5,5,7); }
	}
	else{
		LL tx = 1;
		for(LL i = 1;i <= x;i ++){
			cov(tx,tx,4);
			tx += 4;
		}
		for(LL i = 1;i <= y;i ++){
			cov(tx,tx,5);
			tx += 5;
		}
	}
	for(LL i = 1;i <= n;i ++){
		for(LL j = 1;j <= n;j ++){
			if(!g[i][j]) g[i][j] = '.';
			cout << g[i][j];
		}
		cout << endl;
	}
}

int main(){
	cin >> n;
	init();
	if(n <= 2) solve(-1,2);
	if(n == 3) solve(-1,3);
	if(n == 4) solve(1,0);
	if(n == 5) solve(0,1);
	if(n == 6) solve(-1,6);
	if(n == 7) solve(-1,7);
	if(n == 11) solve(-1,11);
	if(n < 8 || n == 11) return 0;
	for(LL i = 0;i <= 1000;i ++){
		if((n - i * 4) % 5 == 0){
			solve(i,(n - i * 4) / 5);
			break;
		}
	}
	return 0;
}
//