#include <bits/stdc++.h>
using namespace std; 
int main(){
	string P[4] = {"aabc", "ddbc", "bcaa", "bcdd"}; 
	string Q[5] = {"aabbc", "b.ddc", "bd..a", "cd..a", "caabb"}; 
	string R[6] = {"abba..", "a.ca..", "ddc.cc", "a..abb", "a..a.c", ".bbddc"}; 
	string S[7] = {".aa.aab", "a..a..b", "a..a..c", ".aa.aac", "a..a..b", "a..a..b", "bbccbb."}; 
	int N; cin >> N; 
	if(N == 2){
		cout << -1 << endl; return 0; 
	}
	else if(N == 3){
		cout << "aa." << endl; 
		cout << "..b" << endl; 
		cout << "..b" << endl; 
		return 0; 
	}
	char ans[1010][1010] = {}; 
	for(int i = 0; i < N; i++){
		for(int j = 0; j < N; j++){
			ans[i][j] = '.'; 
		}
	}
	int q = (N - 4) / 4; int r = N - 4 * q; 
	if(r == 4){
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 4; j++){
				ans[i][j] = P[i].at(j); 
			}
		}
	}
	if(r == 5){
		for(int i = 0; i < 5; i++){
			for(int j = 0; j < 5; j++){
				ans[i][j] = Q[i].at(j); 
			}
		}
	}
	if(r == 6){
		for(int i = 0; i < 6; i++){
			for(int j = 0; j < 6; j++){
				ans[i][j] = R[i].at(j); 
			}
		}
	}
	if(r == 7){
		for(int i = 0; i < 7; i++){
			for(int j = 0; j < 7; j++){
				ans[i][j] = S[i].at(j); 
			}
		}
	}
	for(int t = 0; t < q; t++){
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 4; j++){
				ans[r + 4*t + i][r + 4*t + j] = P[i].at(j); 
			}
		}
	}
	for(int i = 0; i < N; i++){
		for(int j = 0; j < N; j++){
			cout << ans[i][j]; 
		}
		cout << endl; 
	}
}