#include <bits/stdc++.h>
using namespace std;
#define mp(a,b) make_pair(a,b)
#define ff first
#define setp(a) setprecision(a)<<fixed
#define ss second
#define fori(v) for(int i=0; i<v; i++)
#define forj(v) for(int j=0; j<v; j++)
#define fork(v) for(int k=0; k<v; k++)
#define forl(v) for(int l=0; l<v; l++)
#define fort(v) for(int t=0; t<v; t++)
#define forz(v) for(int z=0; z<v; z++)
#define forx(v) for(int x=0; x<v; x++)
#define ll long long
#define lll __int128
#define MAX (int)(4*pow(10,3) + 100)
#define pb(a) push_back(a)
#define ch (int)(4*pow(10,4) + 100)
#define ld long double
// #define cout out
// #define cin in
ll inf = pow(10,18);
ll modulo = pow(10,9)+7 ;
double eps = 1e-9;
ifstream in;
ofstream out;
 
 
 
 
void deal(){
	vector<vector<vector<char> > >  all(10);
	for(ll i =1; i<10; i++){
		all[i] = vector<vector<char> > (i,  vector<char>(i, '.'));
	}
	 all[4][0][0] = 'a' ;
 all[4][0][1] = 'a' ;
 all[4][0][2] = 'b' ;
 all[4][0][3] = 'c' ;
 all[4][1][0] = 'd' ;
 all[4][1][1] = 'd' ;
 all[4][1][2] = 'b' ;
 all[4][1][3] = 'c' ;
 all[4][2][0] = 'e' ;
 all[4][2][1] = 'f' ;
 all[4][2][2] = 'g' ;
 all[4][2][3] = 'g' ;
 all[4][3][0] = 'e' ;
 all[4][3][1] = 'f' ;
 all[4][3][2] = 'h' ;
 all[4][3][3] = 'h' ;
 all[5][0][0] = 'a' ;
 all[5][0][1] = 'a' ;
 all[5][0][2] = 'b' ;
 all[5][0][3] = 'b' ;
 all[5][0][4] = 'c' ;
 all[5][1][0] = 'd' ;
 all[5][1][1] = 'd' ;
 all[5][1][2] = 'e' ;
 all[5][1][3] = '.' ;
 all[5][1][4] = 'c' ;
 all[5][2][0] = 'f' ;
 all[5][2][1] = 'f' ;
 all[5][2][2] = 'e' ;
 all[5][2][3] = 'g' ;
 all[5][2][4] = 'g' ;
 all[5][3][0] = '.' ;
 all[5][3][1] = '.' ;
 all[5][3][2] = 'h' ;
 all[5][3][3] = 'i' ;
 all[5][3][4] = 'j' ;
 all[5][4][0] = '.' ;
 all[5][4][1] = '.' ;
 all[5][4][2] = 'h' ;
 all[5][4][3] = 'i' ;
 all[5][4][4] = 'j' ;
 all[6][0][0] = 'a' ;
 all[6][0][1] = 'a' ;
 all[6][0][2] = 'b' ;
 all[6][0][3] = 'b' ;
 all[6][0][4] = 'c' ;
 all[6][0][5] = 'c' ;
 all[6][1][0] = 'd' ;
 all[6][1][1] = 'd' ;
 all[6][1][2] = 'e' ;
 all[6][1][3] = 'e' ;
 all[6][1][4] = 'f' ;
 all[6][1][5] = 'f' ;
 all[6][2][0] = 'g' ;
 all[6][2][1] = 'h' ;
 all[6][2][2] = 'i' ;
 all[6][2][3] = '.' ;
 all[6][2][4] = '.' ;
 all[6][2][5] = '.' ;
 all[6][3][0] = 'g' ;
 all[6][3][1] = 'h' ;
 all[6][3][2] = 'i' ;
 all[6][3][3] = '.' ;
 all[6][3][4] = '.' ;
 all[6][3][5] = '.' ;
 all[6][4][0] = '.' ;
 all[6][4][1] = '.' ;
 all[6][4][2] = '.' ;
 all[6][4][3] = 'j' ;
 all[6][4][4] = 'k' ;
 all[6][4][5] = 'l' ;
 all[6][5][0] = '.' ;
 all[6][5][1] = '.' ;
 all[6][5][2] = '.' ;
 all[6][5][3] = 'j' ;
 all[6][5][4] = 'k' ;
 all[6][5][5] = 'l' ;
 all[7][0][0] = 'a' ;
 all[7][0][1] = 'a' ;
 all[7][0][2] = 'b' ;
 all[7][0][3] = 'b' ;
 all[7][0][4] = 'c' ;
 all[7][0][5] = 'c' ;
 all[7][0][6] = '.' ;
 all[7][1][0] = 'd' ;
 all[7][1][1] = 'd' ;
 all[7][1][2] = 'e' ;
 all[7][1][3] = 'e' ;
 all[7][1][4] = 'f' ;
 all[7][1][5] = '.' ;
 all[7][1][6] = '.' ;
 all[7][2][0] = 'g' ;
 all[7][2][1] = 'g' ;
 all[7][2][2] = '.' ;
 all[7][2][3] = '.' ;
 all[7][2][4] = 'f' ;
 all[7][2][5] = 'h' ;
 all[7][2][6] = 'h' ;
 all[7][3][0] = '.' ;
 all[7][3][1] = '.' ;
 all[7][3][2] = 'i' ;
 all[7][3][3] = 'j' ;
 all[7][3][4] = '.' ;
 all[7][3][5] = '.' ;
 all[7][3][6] = 'k' ;
 all[7][4][0] = '.' ;
 all[7][4][1] = '.' ;
 all[7][4][2] = 'i' ;
 all[7][4][3] = 'j' ;
 all[7][4][4] = '.' ;
 all[7][4][5] = '.' ;
 all[7][4][6] = 'k' ;
 all[7][5][0] = '.' ;
 all[7][5][1] = '.' ;
 all[7][5][2] = '.' ;
 all[7][5][3] = '.' ;
 all[7][5][4] = 'l' ;
 all[7][5][5] = 'm' ;
 all[7][5][6] = 'n' ;
 all[7][6][0] = '.' ;
 all[7][6][1] = '.' ;
 all[7][6][2] = '.' ;
 all[7][6][3] = '.' ;
 all[7][6][4] = 'l' ;
 all[7][6][5] = 'm' ;
 all[7][6][6] = 'n' ;
 	ll n;
 	cin>>n;
 	if(n < 3){
 		cout<<-1;
 		return;
 	}
 	vector<vector<char> > arr(n, vector<char>(n,'.'));
 	if(n%3 == 0){
 		for(ll i =0, j= 0; i<n; i+=3, j+=3){
 			arr[i][j] = 'a', arr[i][j+1] = 'a', arr[i+1][j+2] = 'a', arr[i+2][j+2] = 'a';
 		}
 	}
 	else{
 		ll ed = n%4 + 4;
 		fori(ed){
 			forj(ed){
 				arr[i][j] = all[ed][i][j];
 			}
 		}
 		for(ll i = ed, j = ed; i<n; i+=4, j+=4){
 			for(ll i1 = i; i1 < i+4; i1++){
				for(ll j1 = j; j1 < j + 4; j1++){
					arr[i1][j1] = all[4][i1-i][j1-j];
				}
			}
 		}
 	}
 	fori(n){
 		forj(n){
 			cout<<arr[i][j];
 		}
 		cout<<'\n';
 	}
}
 
 
int main(){
	cin.tie(0);
	ios_base::sync_with_stdio(0);
	deal();
}
 
 
 
/* 
6 8 
1 2
2 3
3 4
4 1
2 5
3 5
1 6
4 6
*/

Measured memory_bytes: 2304