#include <bits/stdc++.h>
using namespace std;
#define oo 1000000010
#define mod 1000000007
const int N = 1010;
char grid[N][N];
int r[N] , r2[N];
int n;


string tmp[] = {"aabbi","ccf.i","ddfee","..ghj","..ghj"};

string tmp2[] = {"aabbcc.","ddee..l","ffgg..l","....hjm","....hjm","....ikn","....ikn"};

int main(){
	cin >> n;
	for(int i = 0 ;i < n;i++) for(int j = 0 ;j < n;j++) grid[i][j] ='.';
	for(int i = 0 ;i < n;i++) grid[i][n] = '\0';
	if(n == 2){
		puts("-1");
		return 0;
	}
	if(n == 7){
		for(int i = 0 ;i < n;i++)
			puts(tmp2[i].c_str());
		return 0;
	}
	if(n == 5){
		for(int i = 0 ;i < n;i++)
			puts(tmp[i].c_str());
		return 0;
	}
	if(n % 3 == 0){
		for(int i = 0 , j = 0;i < n;i+=3,j+=3){
			grid[i][j] = grid[i][j + 1] = 'a';
			grid[i + 1][j + 2] = 'b';
			grid[i + 2][j + 2] = 'b';
		}
		for(int i = 0; i < n;i++)
			puts(grid[i]);
		return 0;
	}
	if(n % 2 == 0 && n != 2){
		for(int i = 0 , j = 0;i < n;i+=2, j += 2){
			grid[i][j] = grid[i][j + 1] = 'a';
			grid[i + 1][j] = grid[i + 1][j + 1] = 'b';
		}
		for(int i = 0 , j = 2;j < n;i += 2, j += 2){
			grid[i][j] = grid[i + 1][j] = 'c';
			grid[i][j + 1] = grid[i + 1][j + 1] = 'd'; 
		}
		grid[n - 2][0] = grid[n - 1][0] = 'c';
		grid[n - 2][1] = grid[n - 1][1] = 'd';
		for(int i = 0 ;i < n;i++)
			puts(grid[i]);
		return 0;
	}
	else if(n % 2 == 1){
		for(int i = 0 ;i < 5;i++) for(int j = 0 ;j < 5;j++) grid[i][j] = tmp[i][j];
		for(int i = 5 , j = 5; i < n;i+=2,j+=2){
			grid[i][j] = grid[i][j + 1] = 'a';
			grid[i + 1][j] = grid[i + 1][j + 1] = 'b';
		}
		for(int i = 5 , j = 7;j < n;i += 2, j += 2){
			grid[i][j] = grid[i + 1][j] = 'c';
			grid[i][j + 1] = grid[i + 1][j + 1] = 'd'; 
		}
		grid[n - 2][5] = grid[n - 1][5] = 'c';
		grid[n - 2][6] = grid[n - 1][6] = 'd';
		for(int i = 0 ;i < n;i++)
			puts(grid[i]);
		return 0;
	}
	puts("-1");
	return 0;
}