#include <algorithm>  
#include <iostream>  
#include <sstream>  
#include <string>  
#include <vector>  
#include <queue>  
#include <set>  
#include <map>  
#include <cstdio>  
#include <cstdlib>  
#include <cctype>  
#include <cmath>  
#include <cstring>
#include <list>  
#include <cassert>
#include <climits>
#include <bitset>
using namespace std;  

#define PB push_back  
#define MP make_pair  
#define SZ(v) ((int)(v).size())  
#define FOR(i,a,b) for(int i=(a);i<(b);++i)  
#define REP(i,n) FOR(i,0,n)  
#define FORE(i,a,b) for(int i=(a);i<=(b);++i)  
#define REPE(i,n) FORE(i,0,n)  
#define FORSZ(i,a,v) FOR(i,a,SZ(v))  
#define REPSZ(i,v) REP(i,SZ(v))  
typedef long long ll;  
ll gcd(ll a,ll b) { return b==0?a:gcd(b,a%b); }

const char THREE[3][3 + 1] = { "abb","a.c","ddc" };
const char FOUR[4][4 + 1] = { "abcc","abdd","eefg","hhfg" };
const char FIVE[5][5 + 1] = { "..abc","..abc","ddeff","gge.h","iijjh" };
const char SIX[6][6 + 1] = { "...abc","...abc","d.ee.f","dgg..f","hhi.jj","kkill." };
const char SEVEN[7][7 + 1] = { "....abc","....abc","....def","....def","gghh..i","jjkk..i","llmmnn." };
const int MAXN = 1000;

int n;
char g[MAXN][MAXN + 1];

bool solve() {
	if (n <= 2) return false;
	REP(x, n) REP(y, n) g[x][y] = '.'; REP(x, n) g[x][n] = '\0';
	if (n == 3) {
		REP(x, 3) REP(y, 3) g[x][y] = THREE[x][y];
	} else {
		int rem = n;
		while (rem >= 12) {
			REP(x, 4) REP(y, 4) g[rem - 4 + x][rem - 4 + y] = FOUR[x][y];
			rem -= 4;
		}
		if (rem == 4) {
			REP(x, 4) REP(y, 4) g[x][y] = FOUR[x][y];
		}
		if (rem == 5) {
			REP(x, 5) REP(y, 5) g[x][y] = FIVE[x][y];
		}
		if (rem == 6) {
			REP(x, 6) REP(y, 6) g[x][y] = SIX[x][y];
		}
		if (rem == 7) {
			REP(x, 7) REP(y, 7) g[x][y] = SEVEN[x][y];
		}
		if (rem == 8) {
			REP(x, 4) REP(y, 4) g[x][y] = FOUR[x][y];
			REP(x, 4) REP(y, 4) g[4 + x][4 + y] = FOUR[x][y];
		}
		if (rem == 9) {
			REP(x, 4) REP(y, 4) g[x][y] = FOUR[x][y];
			REP(x, 5) REP(y, 5) g[4 + x][4 + y] = FIVE[x][y];
		}
		if (rem == 10) {
			REP(x, 5) REP(y, 5) g[x][y] = FIVE[x][y];
			REP(x, 5) REP(y, 5) g[5 + x][5 + y] = FIVE[x][y];
		}
		if (rem == 11) {
			REP(x, 5) REP(y, 5) g[x][y] = FIVE[x][y];
			REP(x, 6) REP(y, 6) g[5 + x][5 + y] = SIX[x][y];
		}
	}
	return true;
}

void run() {
	scanf("%d", &n);
	if (!solve()) { printf("-1\n"); return; }
	REP(x, n) printf("%s\n", g[x]);
}

/*const int MAXN = 10;
char g[MAXN + 1][MAXN + 1];

int rowcnt[MAXN], colcnt[MAXN];

char getchar(int id) { if (id < 26) return 'a' + id; if (id < 52) return 'A' + id; assert(false); return '-'; }
bool rec(int x, int y, int z,int id) {
	if (x >= n) {
		bool ok = true; REP(i, n) if (colcnt[i] != z) ok = false;
		if (ok) { printf("found\n"); REP(i, n) printf("%s\n", g[i]); }
		return ok;
	}
	bool ret = false;
	if (y >= n) {
		if (rowcnt[x] == z) ret=rec(x + 1, 0, z, id);
		return ret;
	}
	ret = rec(x, y + 1, z, id);
	if (!ret && g[x][y]=='?' && x + 1 < n && rowcnt[x] < n && rowcnt[x + 1] < n && colcnt[y] < n) {
		char c = getchar(id);
		g[x][y] = g[x + 1][y] = c; ++rowcnt[x], ++rowcnt[x + 1], ++colcnt[y];
		ret = rec(x, y + 1, z, id + 1);
		g[x][y] = g[x + 1][y] = '?'; --rowcnt[x], --rowcnt[x + 1], --colcnt[y];
	}
	if (!ret && g[x][y] == '?' && y + 1 < n && g[x][y + 1] == '?' && rowcnt[x] < n && colcnt[y] < n && colcnt[y + 1] < n) {
		char c = getchar(id);
		g[x][y] = g[x][y + 1] = c; ++rowcnt[x], ++colcnt[y], ++colcnt[y + 1];
		ret = rec(x, y + 2, z, id + 1);
		g[x][y] = g[x][y + 1] = '?'; --rowcnt[x], --colcnt[y], --colcnt[y + 1];
	}
	return ret;
}


void research() {
	for (n = 1; n <= 10; ++n) {
		for (int z = 1; z <= n; ++z) {
			REP(i, n) rowcnt[i] = colcnt[i] = 0;
			REP(x, n) REP(y, n) g[x][y] = '?'; REP(x, n) g[x][n] = '\0';
			rec(0, 0, z, 0);
		}
	}
}*/

int main() {
	//research();
	run();
	return 0;
}


Measured memory_bytes: 2176