#include <bits/stdc++.h>
using namespace std;

char ans[1005][1005];

int main() {
	int N; cin >> N;
	if (N < 3) return !printf("-1");
	for (int i = 1; i <= N; ++i) for (int j = 1; j <= N; ++j) ans[i][j] = '.';
	if (N % 4 == 0) {
		for (int i = 0; i < N / 4; ++i) {
			int x = 1 + i * 2, y = 1 + i * 2;
			int xx = N - i * 2, yy = N - i * 2;
			ans[x][y] = ans[x][y + 1] = 'a';
			ans[x + 1][y] = ans[x + 1][y + 1] = 'b';

			ans[x][yy] = ans[x + 1][yy] = 'c';
			ans[x][yy - 1] = ans[x + 1][yy - 1] = 'd';

			ans[xx][yy] = ans[xx][yy - 1] = 'e';
			ans[xx - 1][yy] = ans[xx - 1][yy - 1] = 'f';

			ans[xx][y] = ans[xx - 1][y] = 'g';
			ans[xx][y + 1] = ans[xx - 1][y + 1] = 'h';
		}
	}
	else if (N % 4 == 1) {
		for (int i = 0; i < N / 4 - 1; ++i) {
			int x = 1 + i * 2, y = 1 + i * 2;
			int xx = N - i * 2, yy = N - i * 2;
			ans[x][y] = ans[x][y + 1] = 'a';
			ans[x + 1][y] = ans[x + 1][y + 1] = 'b';

			ans[x][yy] = ans[x + 1][yy] = 'a';
			ans[x][yy - 1] = ans[x + 1][yy - 1] = 'b';

			ans[xx][yy] = ans[xx][yy - 1] = 'a';
			ans[xx - 1][yy] = ans[xx - 1][yy - 1] = 'b';

			ans[xx][y] = ans[xx - 1][y] = 'a';
			ans[xx][y + 1] = ans[xx - 1][y + 1] = 'b';
		}
		int m = N + 1 >> 1;
		ans[m - 2][m - 2] = ans[m - 2][m - 1] = 'a';
		ans[m - 2][m] = ans[m - 2][m + 1] = 'b';
		ans[m - 2][m + 2] = ans[m - 1][m + 2] = 'c';
		ans[m - 1][m - 2] = ans[m][m - 2] = 'd';
		ans[m - 1][m] = ans[m - 1][m + 1] = 'e';
		ans[m][m - 1] = ans[m + 1][m - 1] = 'f';
		ans[m][m + 2] = ans[m + 1][m + 2] = 'g';
		ans[m + 1][m - 2] = ans[m + 2][m - 2] = 'h';
		ans[m + 2][m - 1] = ans[m + 2][m] = 'i';
		ans[m + 2][m + 1] = ans[m + 2][m + 2] = 'j';
	}
	else if (N % 4 == 2) {
		for (int i = 0; i < N / 4 - 1; ++i) {
			int x = 1 + i * 2, y = 1 + i * 2;
			int xx = N - i * 2, yy = N - i * 2;
			ans[x][y] = ans[x][y + 1] = 'a';
			ans[x + 1][y] = ans[x + 1][y + 1] = 'b';

			ans[x][yy] = ans[x + 1][yy] = 'a';
			ans[x][yy - 1] = ans[x + 1][yy - 1] = 'b';

			ans[xx][yy] = ans[xx][yy - 1] = 'a';
			ans[xx - 1][yy] = ans[xx - 1][yy - 1] = 'b';

			ans[xx][y] = ans[xx - 1][y] = 'a';
			ans[xx][y + 1] = ans[xx - 1][y + 1] = 'b';
		}
		int m = N >> 1;
		char A[6][7] = {
			"aacd..",
			"bbcd..",
			"ef..aa",
			"ef..bb",
			"..ccef",
			"..ddef"
		};
		for (int i = -2; i <= 3; ++i)
			for (int j = -2; j <= 3; ++j)
				ans[m + i][m + j] = A[i + 2][j + 2];
	}
	else {
		if (N == 3) {
			for (int i = 0; i < 1 + N / 4; ++i) {
				int x = 1 + i * 2, y = 1 + i * 2;
				int xx = N - i * 2, yy = N - i * 2;
				ans[x][y] = ans[x][y + 1] = 'a';
				ans[x][yy] = ans[x + 1][yy] = 'b';
				ans[xx][yy] = ans[xx][yy - 1] = 'c';
				ans[xx][y] = ans[xx - 1][y] = 'd';
			}
		}
		else {
			for (int i = 0; i < N / 4 - 1; ++i) {
				int x = 1 + i * 2, y = 1 + i * 2;
				int xx = N - i * 2, yy = N - i * 2;
				ans[x][y] = ans[x][y + 1] = 'a';
				ans[x + 1][y] = ans[x + 1][y + 1] = 'b';

				ans[x][yy] = ans[x + 1][yy] = 'a';
				ans[x][yy - 1] = ans[x + 1][yy - 1] = 'b';

				ans[xx][yy] = ans[xx][yy - 1] = 'a';
				ans[xx - 1][yy] = ans[xx - 1][yy - 1] = 'b';

				ans[xx][y] = ans[xx - 1][y] = 'a';
				ans[xx][y + 1] = ans[xx - 1][y + 1] = 'b';
			}
			int m = N + 1 >> 1;
			
			char A[7][8] = {
				".aabbcc",
				"d.eeff.",
				"da....c",
				"ea....c",
				"eb....d",
				"fb....d",
				"f.eeff."
			};
			for (int i = -3; i <= 3; ++i)
				for (int j = -3; j <= 3; ++j) ans[m + i][m + j] = A[i + 3][j + 3];
		}
	}
	for (int i = 1; i <= N; ++i) {
		printf("%s\n", ans[i] + 1);
	}
	return 0;
}

Measured memory_bytes: 2176