#define _CRT_SECURE_NO_WARNINGS
#pragma comment(linker, "/STACK:256000000")
#define _USE_MATH_DEFINES
#include<iostream>
#include<vector>
#include<string>
#include<stack>
#include<algorithm>
#include<cmath>
#include<set>
#include<queue>
#include<sstream>
#include<utility>
#include<map>
#include<ctime>
#include<cstdio>
#include<cassert>
#include<functional>
#include<unordered_map>
#include<deque>
#include<cmath>





using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
typedef pair<char, char> pcc;
typedef pair<double, double> pdd;

#define show(x) cerr << x
#define debug(x) show(#x << ": " << (x) << endl)

const long double PI = 3.14159265358979323846;
const long double eps = 1e-5;
const ll INF = numeric_limits<int>::max();
const ll LINF = numeric_limits<ll>::max();
const ll mod = 1000 * 1000 * 1000 + 7;




void solve() {
    int n;
    cin >> n;
    if (n == 2) {
        cout << -1 << endl;
        return;
    }
    vector<string> res4 = {"aabc", "ddbc", "efgg", "efhh"};
    vector<string> res3 = {"aab", "d.b", "dcc"};

    vector<string> res5 = {"aabbc",
                           "de..c",
                           "de..f", 
                           "g.hhf", 
                           "giijj"};
    vector<string> res7 = {"aabbcc.",
                           "ggh...d",
                           "j.h...d",
                           "jii...e",
                           "...kkle",
                           "...n.lf",
                           "...nmmf"};
    int a4 = 0, a5 = 0, a7 = 0, a3 = 0;
    if (n % 3 == 0) {
        vector<string> res(n);
        for (int i = 0; i < n; ++i) {
            res[i].assign(n, '.');
        }
        for (int i = 0; i < n; i += 3) {
            for (int i1 = 0; i1 < 3; ++i1) {
                for (int j1 = 0; j1 < 3; ++j1) {
                    res[i + i1][i + j1] = res3[i1][j1];
                }
            }
        }
        for (int i = 0; i < n; ++i) {
            cout << res[i] << "\n";
        }
        return;
    }
    if ((n >= 12) || (n == 8) || (n == 4) || (n == 5) || (n == 10)) {
        while ((n % 4) != 0) {
            ++a5;
            n -= 5;
        }
        a4 = n / 4;
        //cerr << a4 << " " << a5 << endl;
        n = 4 * a4 + 5 * a5;
        vector<string> res(n);
        for (int i = 0; i < n; ++i) {
            res[i].assign(n, '.');
        }
        for (int i = 0; i < 4 * a4; i += 4) {
            for (int i1 = 0; i1 < 4; ++i1) {
                for (int j1 = 0; j1 < 4; ++j1) {
                    res[i + i1][i + j1] = res4[i1][j1];
                }
            }
        }
        for (int i = 4 * a4; i < n; i += 5) {
            for (int i1 = 0; i1 < 5; ++i1) {
                for (int j1 = 0; j1 < 5; ++j1) {
                    res[i + i1][i + j1] = res5[i1][j1];
                }
            }
        }
        for (int i = 0; i < n; ++i) {
            cout << res[i] << "\n";
        }
        return;
    }
    if (n == 7) {
        a7 = 1;
        for (int i = 0; i < n; ++i) {
            cout << res7[i] << "\n";
        }
        return;
    }
    vector<string> res(n);
    for (int i = 0; i < n; ++i) {
        res[i].assign(n, '.');
    }
    for (int i1 = 0; i1 < 7; ++i1) {
        for (int j1 = 0; j1 < 7; ++j1) {
            res[i1][j1] = res7[i1][j1];
        }
    }
    for (int i1 = 0; i1 < 4; ++i1) {
        for (int j1 = 0; j1 < 4; ++j1) {
            res[7 + i1][7 + j1] = res4[i1][j1];
        }
    }
    for (int i = 0; i < n; ++i) {
        cout << res[i] << "\n";
    }
    return;




}


//#define LOCAL

int main() {
    ios_base::sync_with_stdio(0);cin.tie(nullptr);cout.tie(nullptr);
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    solve();



#ifdef LOCAL
    cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
#endif	
    return 0;
}


Measured memory_bytes: 2304