#include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<deque>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
#include<cassert>
using namespace std;

typedef long long ll;
typedef unsigned long long ul;
typedef unsigned int ui;
typedef long double ld;
const int inf=1e9+7;
const ll INF=1LL<<60 ;
const ll mod=1e9+7 ;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<int, int> P;
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second
#define all(c) c.begin(),c.end()
#define pb push_back
#define debug(x)  cout << #x << " = " << (x) << endl;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
//#define int long long

int n;

void rec(vector<vector<char>>& f, vector<vector<int>>& co, int cnt, int x, int y) {
    if(y == n) {
        rec(f, co, cnt, x + 1, 0);
        return;
    }
    if(x == n) {
        // rep(i, n) {
        //     rep(j, n) {
        //         cout << f[i][j];
        //     }
        //     cout << endl;
        // }
        if(cnt == 0) {
            bool ok = 1;
            rep(i, n) {
                if(co[0][i] != 3) ok = 0;
                if(co[1][i] != 3) ok = 0;
            }
            if(ok) {
                rep(i, n) {
                    rep(j, n) {
                        cout << f[i][j];
                    }
                    cout << endl;
                }
                exit(0);
            }
        }
        return;
    }
    //横に置く
    if(y + 1 < n and f[x][y] == '.' and f[x][y + 1] == '.') {
        co[0][x] ++;
        co[1][y] ++;
        co[1][y + 1] ++;
        f[x][y] = 'a' + cnt;
        f[x][y + 1] = 'a' + cnt;
        if(co[0][x] <= 3 && co[1][y] <= 3 && co[1][y + 1] <= 3 && cnt >= 1) rec(f, co, cnt - 1, x, y + 1);
        co[0][x] --;
        co[1][y] --;
        co[1][y + 1] --;
        f[x][y] = '.';
        f[x][y + 1] = '.';
    }
    //置かない
    rec(f, co, cnt, x, y + 1);
    //縦におく
    if(x + 1 < n and f[x][y] == '.' and f[x + 1][y] == '.') {
        co[0][x] ++;
        co[1][y] ++;
        co[0][x + 1] ++;
        f[x][y] = 'a' + cnt;
        f[x + 1][y] = 'a' + cnt;
        if(co[0][x] <= 3 && co[1][y] <= 3 && co[0][x + 1] <= 3 && cnt >= 1) rec(f, co, cnt - 1, x, y + 1);
        co[0][x] --;
        co[1][y] --;
        co[0][x + 1] --;
        f[x][y] = '.';
        f[x + 1][y] = '.';
    }
}

string a[3] = { "aa.", "..a", "..a"};
string b[4] = { "iihg", "ffhg", "edcc", "edbb" };
string c[5] = { "kkjji", "hh.gi", ".ffge", "d.c.e", "d.cbb"};
string d[6] = { "mmllkk", "jjiihh", "...gfe", "...gfe", "dcb...", "dcb..." };
string e[7] = { "oonnmm.", "llkk..j", "iihh..j", "....gfe", "....gfe", "....dcb", "....dcb" };

void solve() {
	cin >> n;
    // vector<vector<char>> f(n, vector<char>(n, '.'));
    // vector<vector<int>> co(2, vector<int>(n, 0));
    // int cnt = 14;
    // rec(f, co, cnt, 0, 0);
    if(n == 2) {
        cout << -1 << endl;
    } else if(n == 3) {
        rep(i, 3) {
            cout << a[i] << endl;
        }
    } else if(n == 4) {
        rep(i, 4) {
            cout << b[i] << endl;
        }
    } else if(n == 5) {
        rep(i, 5) {
            cout << c[i] << endl;
        } 
    } else if(n == 6) {
        rep(i, 6) {
            cout << d[i] << endl;
        }
    } else if(n == 7) {
        rep(i, 7) {
            cout << e[i] << endl;
        }
    } else if(n == 11) {
        rep(i, 5) {
            cout << c[i];
            rep(j, 6) cout << ".";
            cout << endl;
        }
        rep(i, 6) {
            rep(j, 5) cout << ".";
            cout << d[i] << endl;
        }
    } else {
        for(int p = 0; p <= 250; ++ p) {
            for(int q = 0; q <= 200; ++ q) {
                if(4 * p + 5 * q == n) {
                    int co = 0;
                    rep(i, p) {
                        rep(x, 4) {
                            rep(y, co) cout << ".";
                            cout << b[x];
                            rep(y, n - co - 4) cout << ".";
                            cout << endl;
                        }
                        co += 4;
                    }
                    rep(j, q) {
                        rep(x, 5) {
                            rep(y, co) cout << ".";
                            cout << c[x];
                            rep(y, n - co - 5) cout << ".";
                            cout << endl;
                        }
                        co += 5;
                    }
                    return;
                }
            }
        }
    }
}

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	//cout << fixed << setprecision(10);
	//init();
	solve();
	//cout << "finish" << endl;
    return 0;
}

Measured memory_bytes: 3632