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';
	}

	void put(int i, int j, int x1, int y1, int x2, int y2, char b){
		cf[i + x1][j + y1] = cf[i + x2][j + y2] = b;
	}

	void make5(int i, int j){
		put(i, j, 0, 0, 0, 1, 'a');
		put(i, j, 0, 3, 1, 3, 'b');
		put(i, j, 0, 4, 1, 4, 'c');
		put(i, j, 1, 0, 2, 0, 'd');
		put(i, j, 2, 2, 2, 3, 'e');
		put(i, j, 2, 4, 3, 4, 'f');
		put(i, j, 3, 0, 4, 0, 'g');
		put(i, j, 3, 1, 3, 2, 'h');
		put(i, j, 4, 1, 4, 2, 'i');
		put(i, j, 4, 3, 4, 4, 'j');
	}

	void make7(int i, int j){
		put(i, j, 0, 0, 0, 1, 'a');
		put(i, j, 0, 2, 0, 3, 'b');
		put(i, j, 0, 4, 1, 4, 'c');
		put(i, j, 1, 0, 2, 0, 'd');
		put(i, j, 1, 5, 1, 6, 'e');
		put(i, j, 2, 1, 2, 2, 'f');
		put(i, j, 2, 6, 3, 6, 'g');
		put(i, j, 3, 1, 4, 1, 'h');
		put(i, j, 3, 4, 4, 4, 'i');
		put(i, j, 4, 5, 5, 5, 'j');
		put(i, j, 5, 0, 6, 0, 'k');
		put(i, j, 5, 2, 5, 3, 'l');
		put(i, j, 6, 3, 6, 4, 'm');
		put(i, j, 6, 5, 6, 6, 'n');
	}

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

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

}