#define _USE_MATH_DEFINES

#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <unordered_map> 
#include <unordered_set>
#include <functional>
#include <bitset>

using namespace std;

typedef pair<long long int, long long int> P;
typedef tuple<int, int, int> T;

long long int INF = 1e18;
long long int MOD = 1e9 + 7;

void pd(int num){
	for(int j = 0; j < num; j++){
		cout << ".";
	}
}

void func(int W, int D){
	if(D == 4){
		pd((W - D) / 2);
		cout << "abcc";
		pd((W - D) / 2);
		cout << endl;
		pd((W - D) / 2);
		cout << "abdd";
		pd((W - D) / 2);
		cout << endl;
		pd((W - D) / 2);
		cout << "ccab";
		pd((W - D) / 2);
		cout << endl;
		pd((W - D) / 2);
		cout << "ddab";
		pd((W - D) / 2);
		cout << endl;
		return;
	}else if(D == 5){
		pd((W - D) / 2);
		cout << "abbcc";
		pd((W - D) / 2);
		cout << endl;
		pd((W - D) / 2);
		cout << "add.e";
		pd((W - D) / 2);
		cout << endl;
		pd((W - D) / 2);
		cout << "f..ge";
		pd((W - D) / 2);
		cout << endl;
		pd((W - D) / 2);
		cout << "f..gh";
		pd((W - D) / 2);
		cout << endl;
		pd((W - D) / 2);
		cout << "iijjh";
		pd((W - D) / 2);
		cout << endl;
		return;
	}
	if(D == 7){
		pd((W - D) / 2);
		cout << "abb...x";
		pd((W - D) / 2);
		cout << endl;
		pd((W - D) / 2);
		cout << "a.c...x";
		pd((W - D) / 2);
		cout << endl;
		pd((W - D) / 2);
		cout << "ddc...y";
		pd((W - D) / 2);
		cout << endl;
		pd((W - D) / 2);
		cout << "...abby";
		pd((W - D) / 2);
		cout << endl;
		pd((W - D) / 2);
		cout << "...a.cz";
		pd((W - D) / 2);
		cout << endl;
		pd((W - D) / 2);
		cout << "...ddcz";
		pd((W - D) / 2);
		cout << endl;
		pd((W - D) / 2);
		cout << "xxyyzz.";
		pd((W - D) / 2);
		cout << endl;
		return;
	}else if(D == 8){
		pd((W - D) / 2);
		cout << "abcc....";
		pd((W - D) / 2);
		cout << endl;
		pd((W - D) / 2);
		cout << "abdd....";
		pd((W - D) / 2);
		cout << endl;
		pd((W - D) / 2);
		cout << "ccab....";
		pd((W - D) / 2);
		cout << endl;
		pd((W - D) / 2);
		cout << "ddab....";
		pd((W - D) / 2);
		cout << endl;
		pd((W - D) / 2);
		cout << "....abcc";
		pd((W - D) / 2);
		cout << endl;
		pd((W - D) / 2);
		cout << "....abdd";
		pd((W - D) / 2);
		cout << endl;
		pd((W - D) / 2);
		cout << "....ccab";
		pd((W - D) / 2);
		cout << endl;
		pd((W - D) / 2);
		cout << "....ddab";
		pd((W - D) / 2);
		cout << endl;
		return;
	}
	pd((W - D) / 2);
	cout << "abb";
	pd(D - 6);
	cout << "aa.";
	pd((W - D) / 2);
	cout << endl;
	pd((W - D) / 2);
	cout << "a.c";
	pd(D - 6);
	cout << "..b";
	pd((W - D) / 2);
	cout << endl;
	pd((W - D) / 2);
	cout << "ddc";
	pd(D - 6);
	cout << "..b";
	pd((W - D) / 2);
	cout << endl;

	func(W, D - 6);

	pd((W - D) / 2);
	cout << "aa.";
	pd(D - 6);
	cout << "abb";
	pd((W - D) / 2);
	cout << endl;
	pd((W - D) / 2);
	cout << "..b";
	pd(D - 6);
	cout << "a.c";
	pd((W - D) / 2);
	cout << endl;
	pd((W - D) / 2);
	cout << "..b";
	pd(D - 6);
	cout << "ddc";
	pd((W - D) / 2);
	cout << endl;
}

int main(){
	int N;
	cin >> N;
	if(N <= 2){
		cout << -1 << endl;
	}else if(N == 4){
		cout << "abcc" << endl;
		cout << "abdd" << endl;
		cout << "ccab" << endl;
		cout << "ddab" << endl;
	}else if(N % 3 == 0){
		for(int i = 0; i < N; i++){
			for(int j = 0; j < N; j++){
				if(i % 3 == 0 && j % 3 < 2 || i % 3 > 0 && j % 3 == 2){
					cout << "a";
				}else{
					cout << ".";
				}
			}
			cout << endl;
		}
	}else{
		func(N, N);
	}
	return 0;
}

Measured memory_bytes: 1280