#include <iostream>
#include <vector>
#include <array>
#include <list>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <tuple>
#include <memory>
#include <cmath>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <numeric>
#include <climits>
#include <cfloat>
#include <cassert>
#include <random>


void fill_vertical(std::vector<std::string>& str, int left, int top, char c) {
	str[top][left] = str[top + 1][left] = c;
}
void fill_horizontal(std::vector<std::string>& str, int left, int top, char c) {
	str[top][left] = str[top][left + 1] = c;
}
void fill_4(std::vector<std::string>& str, int left, int top) {
	fill_vertical(str, left, top, 'a');
	fill_vertical(str, left + 1, top, 'b');
	fill_vertical(str, left + 2, top + 2, 'a');
	fill_vertical(str, left + 3, top + 2, 'b');
	fill_horizontal(str, left, top + 2, 'c');
	fill_horizontal(str, left, top + 3, 'd');
	fill_horizontal(str, left + 2, top, 'c');
	fill_horizontal(str, left + 2, top + 1, 'd');
}
void fill_3_by_1(std::vector<std::string>& str, int left, int top) {
	fill_horizontal(str, left, top, 'a');
	fill_vertical(str, left + 2, top + 1, 'b');
}
void fill_6(std::vector<std::string>& str, int left, int top) {
	for (auto t = 0; t < 2; ++t) {
		for (auto l = 0; l < 3; ++l) {
			fill_vertical(str, left + l * 2 + t, top + t * 3, 'a');
			fill_horizontal(str, left + l * 2, top + t * 3 + 2, 'b' + l);
		}
	}
}
void fill_3_2(std::vector<std::string>& str, int left, int top) {

	fill_vertical(str, left, top, 'z');
	fill_vertical(str, left + 2, top + 1, 'z');
	fill_horizontal(str, left, top + 2, 'x');
	fill_horizontal(str, left + 2, top, 'x');
}
void fill_7(std::vector<std::string>& str, int left, int top) {
	for (auto i = 1; i < 7; i += 2) {
		fill_vertical(str, left, top + i, 'a' + i);
		fill_horizontal(str, left + i, top, 'a' + i);
	}
	for (auto i = 1; i < 7; i += 3) {
		for (auto j = 1; j < 7; j += 3) {
			fill_3_by_1(str, left + i, top + j);
		}
	}
}
void fill_5(std::vector<std::string>& str, int left, int top) {
	for (auto i = 2; i < 5; ++i) {
		fill_vertical(str, left + i, top, 'a' + i);
		fill_horizontal(str, left, top + i, 'a' + i);
	}
	fill_vertical(str, left + 2, top + 2, 'a');
	fill_vertical(str, left + 4, top + 3, 'a');
	fill_horizontal(str, left + 2, top + 4, 'b');
	fill_horizontal(str, left + 3, top + 2, 'b');
}
void fill_9(std::vector<std::string>& str, int left, int top) {
	for (auto i = 0; i < 9; i += 3) {
		for (auto j = 0; j < 9; j += 3) fill_3_by_1(str, i, j);
	}
}
std::vector<std::string> make(int size) {
	if (size == 2) return {};
	std::vector<std::string> result(size, std::string(size, '.'));
	if (size == 7) {
		fill_7(result, 0, 0);
		return result;
	}
	if (size % 3 == 0) {
		for (auto i = 0; i < size; i += 3) fill_3_by_1(result, i, i);
	}
	else {
		int top = 0;
		if (size % 2 == 1) {
			fill_5(result, 0, 0);
			top = 5;
		}
		for (; top < size; ) {
			if (size - top == 6) {
				fill_6(result, top, top);
				top += 6;
			}
			else {
				fill_4(result, top, top);
				top += 4;
			}
		}
	}
	return result;
}
int main() {
	int n; std::cin >> n;
	auto result = make(n);
	if (result.empty()) {
		std::cout << -1 << std::endl;
	}
	else {
		for (auto& line : result) std::cout << line << '\n';
	}
}


Measured memory_bytes: 2304