import std.stdio, std.conv, std.string, std.array, std.range, std.algorithm, std.container;
import std.math, std.random, std.bigint, std.datetime, std.format;
void main(string[] args){ if(args.length > 1) if(args[1] == "-debug") DEBUG = 1; solve(); }
void log()(){ writeln(""); } void log(T, A ...)(T t, lazy A a){ if(DEBUG) write(t, " "), log(a); } bool DEBUG = 0; 
string rstring(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; }
T rtype(T)(){ return rstring.to!T; } alias rint = rtype!int, rlong = rtype!long, rreal = rtype!real;
T[] rtypes(T)(int n){ return n.iota.map!(i => rtype!T()).array; } alias rint = rtypes!int, rlong = rtypes!long, rreal = rtypes!real;
T[][] rtypess(T)(int n, int m){ return n.iota.map!(i => rtypes!T(m)).array; } alias rint = rtypess!int, rlong = rtypess!long, rreal = rtypess!real;
T chmin(T)(ref T x, T y){ if(x > y) x = y; return x; } T chmax(T)(ref T x, T y){ if(x < y) x = y; return x; }

// ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- //

void solve(){
	int n = rint;
	char[][] cf = new char[][](n, n);
	foreach(i; 0 .. n) foreach(j; 0 .. n) cf[i][j] = '.';

	void make3(int i, int j){
		cf[i + 0][j + 0] = cf[i + 0][j + 1] = 'a';
		cf[i + 1][j + 0] = cf[i + 2][j + 0] = 'b';
		cf[i + 0][j + 2] = cf[i + 1][j + 2] = 'c';
		cf[i + 2][j + 1] = cf[i + 2][j + 2] = 'd';
	}

	void make4(int i, int j){
		cf[i + 0][j + 0] = cf[i + 0][j + 1] = 'a';
		cf[i + 1][j + 0] = cf[i + 1][j + 1] = 'b';
		cf[i + 2][j + 2] = cf[i + 2][j + 3] = 'c';
		cf[i + 3][j + 2] = cf[i + 3][j + 3] = 'd';
		cf[i + 0][j + 2] = cf[i + 1][j + 2] = 'e';
		cf[i + 0][j + 3] = cf[i + 1][j + 3] = 'f';
		cf[i + 2][j + 0] = cf[i + 3][j + 0] = 'g';
		cf[i + 2][j + 1] = cf[i + 3][j + 1] = 'h';
	}

	int a = -1, b = -1;
	foreach(i; 0 .. n) foreach(j; 0 .. n) if(i * 9 + j * 8 == n) a = i, b = j;

	if(n % 3 == 0){
		int m = n / 3;
		foreach(i; 0 .. m) make3(i * 3, i * 3);
	}
	else if(n % 4 == 0){
		int m = n / 4;
		foreach(i; 0 .. m) make4(i * 4, i * 4);
	}
	else if(a >= 0){
		foreach(i; 0 .. a){
			make3(i * 9 + 0, i * 9 + 0);
			make3(i * 9 + 0, i * 9 + 3);
			make3(i * 9 + 0, i * 9 + 6);
			make3(i * 9 + 3, i * 9 + 0);
			make3(i * 9 + 3, i * 9 + 3);
			make3(i * 9 + 3, i * 9 + 6);
			make3(i * 9 + 6, i * 9 + 0);
			make3(i * 9 + 6, i * 9 + 3);
			make3(i * 9 + 6, i * 9 + 6);
		}
		foreach(i; 0 .. b){
			make4(a * 9 + i * 8 + 0, a * 9 + i * 8 + 0);
			make4(a * 9 + i * 8 + 0, a * 9 + i * 8 + 4);
			make4(a * 9 + i * 8 + 4, a * 9 + i * 8 + 0);
			make4(a * 9 + i * 8 + 4, a * 9 + i * 8 + 4);
		}
	}
	else{
		"-1".writeln;
		return;
	}
	foreach(cq; cf) cq.to!string.writeln;

}