#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template<class L, class R>
istream &operator>>(istream &in, pair<L, R> &arr){
    return in >> arr.first >> arr.second;
}
template<class T>
istream &operator>>(istream &in, vector<T> &arr){
	for(auto &x: arr) in >> x; return in;
}
template<class T>
istream &operator>>(istream &in, deque<T> &arr){
	for(auto &x: arr) in >> x; return in;
}
template<class L, class R>
ostream &operator<<(ostream &out, const pair<L, R> &arr){
    return out << "(" << arr.first << ", " << arr.second << ") ";
}
template<class T>
ostream &operator<<(ostream &out, const vector<T> &arr){
	for(auto &x: arr) out << x << " "; return out << "\n";
}
template<class T>
ostream &operator<<(ostream &out, const deque<T> &arr){
	for(auto &x: arr) out << x << " "; return out << "\n";
}
template<class T>
ostream &operator<<(ostream &out, const set<T> &arr){
	for(auto &x: arr) out << x << " "; return out << "\n";
}
template<class L, class R>
ostream &operator<<(ostream &out, const map<L, R> &arr){
	for(auto &x: arr) out << x << " "; return out << "\n";
}
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
mt19937_64 rndll(chrono::steady_clock::now().time_since_epoch().count());
#define all(a) a.begin(), a.end()
#define sz(a) (int)a.size()
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<double> vd;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<int, ll> pil;
typedef pair<ll, int> pli;
typedef vector<pii> vpii;
template<class T>
using Ftn = function<T(T, T)>;
template<class T>
using Tree = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef tuple<int, int, int> tpl;
typedef vector<tpl> vtpl;



int main(){
	cin.tie(0)->sync_with_stdio(0);
	vector<vs> ans(12);
	ans[3] = {
		string("abb"),
		string("a.a"),
		string("bba")
	};
	ans[4] = {
		string("aacd"),
		string("bbcd"),
		string("dcbb"),
		string("dcaa")
	};
	ans[5] = {
		string("aabba"),
		string("b..ca"),
		string("b..cb"),
		string("acc.b"),
		string("abbaa")
	};
	ans[7] = {
		string("..a..ab"),
		string("..a..ab"),
		string("aa.aa.c"),
		string("..a..ac"),
		string("..a..ad"),
		string("aa.aa.d"),
		string("bbccdd.")
	};
	ans[11] = {
		string("aabba......"),
		string("b..ca......"),
		string("b..cb......"),
		string("acc.b......"),
		string("abbaa......"),
		string(".....aab..c"),
		string(".....b.b..c"),
		string(".....baacc."),
		string(".......caab"),
		string(".......cb.b"),
		string(".....cc.baa")
	};
	int n;
	cin >> n;
	if(n == 1 || n == 2){
		cout << -1;
		return 0;
	}
	if(n == 3 || n == 4 || n == 5 || n == 7 || n == 11){
		for(auto s: ans[n]){
			cout << s << "\n";
		}
		return 0;
	}
	vs res(n, string(n, '.'));
	auto solve = [&](int ST, int k){
		for(int i = 0; i < k; ++ i){
			for(int j = 0; j < k; ++ j){
				res[ST + i][ST + j] = ans[k][i][j];
			}
		}
	};
	if(n % 3 == 0){
		for(int i = 0, sum = 0; i < n / 3; ++ i, sum += 3){
			solve(sum, 3);
		}
		for(auto s: res){
			cout << s << "\n";
		}
	}
	else{
		vi t(n / 4, 4);
		for(int i = 0; i < n % 4; ++ i){
			t[i] ++;
		}
		int sum = 0;
		for(auto k: t){
			solve(sum, k);
			sum += k;
		}
		for(auto s: res){
			cout << s << "\n";
		}
	}
	return 0;
}

//////////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                                  //
//                                                                                                  //
//                                              _____________                                       //
//             ++++++++++                ___------------------\                                     //
//           +++`+``+`+`++++        ///`````````````````````````````\                               //
//           ++`+`+``+++`++++  /////```````````````````````````````````\                            //
//           +++`++`+`+``+++/////`````````````````````````````````````````\                         //
//             +++`++`+``+///```````````|```````````````````````````````````\                       //
//          ____++++/++++/`````````````/````````|````````|```````````````````\                      //
//        /  /  / |    //``````````````|````````|```````|````````|````````````\                     //
//       /  /  /  | ///````````/```````|```````||```````|````````|``````\```````\                   //
//       | /  /   |///`````````|``````/````````|````````|````````|```````|```````\                  //
//       |/   |   |//``|```````|``````|````````|`````````|```````|```````|````````\                 //
//       /\___|__//`|``|```````|`    |      ``:|````````|:```````|```````|```|`````|                //
//      /     /  /``|``|``````|/     |        :|     ```:|```````|```````|``++````++                //
//     /     / //```|``|``````|      |        |:        :|    ```|```````|```++``++`\               //
//     |    /  /````|``|``````/    _.::::.    |          |      |    ````|```|`++`\`|               //
//     |   /   |````|``|`````|            `                    |       ``|```++``++`|               //
//     |  /    |````|``|`````|                                 :         |``++````++|               //
//     | /     /````|``|`````|                              _.-:::.      |..`|``.`|.|               //
//     |/     /`````|``|`````|                                     `     |```|````|`|               //
//    /|      |`````|``|`````|                    :'                    .|```|````|.|               //
//   / |      |`````|``|`````|                                         /|-|``|````|`|               //
//  /  |      |`````|```\````|                                        / ||```|````|``\              //
// /   |      |`````|````|```|::                                    /_| ||```|````|``|              //
//            |`````|````|```|:|:.        `.._                    .\___/:|```|````|``|              //
//            |`````\````|```|:|::-          ``:::....           -:|:|:::|```|````|``|              //
//            |``````|```|```|:|::`|.                          .:::|:|:::|```|````|``|              //
//             \`````|```|```|:|::/|--.                     .`:|:::|:|:::/```|````|``|              //
//              |````|```|```\:|:|:|-----             _..-:|:|:|:::|:|::|````|````|`/               //
//              |````|```|````\|:|:|-------.____.....------|/::|:::|:|::|````|````|`|               //
//              |````|```|\````\:|/\___________    ________/\--\:::|:|::|````/````|`|               //
//              |````\```| \```|:/-------------\  /----------\``\::|:|::|```/`````|`|               //
//              |`````|``|  \``|/---------------\/------------\_________|```|`````|`|               //
//                                                                                                  //
//////////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                                  //
//                                        Created by Aeren                                          //
//                                                                                                  //
//////////////////////////////////////////////////////////////////////////////////////////////////////

Measured memory_bytes: 2304