#include <bits/stdc++.h>
#define pb push_back
#define pll pair <ll, ll>
#define mp make_pair
#define pyshnapyshnakaa ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define x first
#define y second
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
// #pragma GCC optimize("avx2")
// #pragma GCC optimize("unroll-loops")
#pragma GCC target ("sse4.2")
#define plll pair <pair <ll, ll>, ll>
#define pllll pair <pair <ll, ll>, pair <ll, ll> >
#define psl pair <string, ll>
#define all(a) a.begin(), a.end()

typedef long long ll;

typedef long double ld;

using namespace std;

const ll maxn = 1e3 + 100;

ll n, m, v, p;

ll ANS[maxn][maxn];

void put3(ll i, ll j) {
    ANS[i][j] = ANS[i][j + 1] = 1;
    ANS[i][j + 2] = ANS[i + 1][j + 2] = 2;
    ANS[i + 2][j + 2] = ANS[i + 2][j + 1] = 3;
    ANS[i + 2][j] = ANS[i + 1][j] = 4;
}

void put4(ll i, ll j) {
    ANS[i][j] = ANS[i + 1][j] = 1;
    ANS[i][j + 1] = ANS[i + 1][j + 1] = 2;

    ANS[i + 2][j + 2] = ANS[i + 3][j + 2] = 3;
    ANS[i + 2][j + 3] = ANS[i + 3][j + 3] = 4;

    ANS[i][j + 2] = ANS[i][j + 3] = 5;
    ANS[i + 1][j + 2] = ANS[i + 1][j + 3] = 6; 

    ANS[i + 2][j] = ANS[i + 2][j + 1] = 7;
    ANS[i + 3][j] = ANS[i + 3][j + 1] = 8; 
}

void put5(ll i, ll j) {
    ANS[i][j] = ANS[i + 1][j] = 1;
    ANS[i][j + 1] = ANS[i][j + 2] = 2;
    ANS[i][j + 3] = ANS[i][j + 4] = 3;
    ANS[i + 1][j + 1] = ANS[i + 1][j + 2] = 4;
    ANS[i + 1][j + 4] = ANS[i + 2][j + 4] = 5;
    ANS[i + 2][j] = ANS[i + 3][j] = 6;
    ANS[i + 2][j + 3] = ANS[i + 3][j + 3] = 7;
    ANS[i + 3][j + 4] = ANS[i + 4][j + 4] = 8;
    ANS[i + 4][j] = ANS[i + 4][j + 1] = 9;
    ANS[i + 4][j + 2] = ANS[i + 4][j + 3] = 10;
}

void out() {
    ll q, w;
    for (q = 0; q < n; q++) {
        for (w = 0; w < n; w++) {
            if (ANS[q][w] == 0) {
                cout << '.';
            }
            else {
                cout << char('a' + ANS[q][w] - 1);
            }
        }
        cout << endl;
    }
}

int main() {
    pyshnapyshnakaa;
    ll q, w, e, a, b, c;
    cin >> n;
    ll cur = 0;
    if (n == 7) {
        ANS[0][1] = ANS[0][2] = 5;
        ANS[0][3] = ANS[0][4] = 6;
        ANS[0][5] = ANS[0][6] = 7;
        ANS[1][0] = ANS[2][0] = 8;
        ANS[3][0] = ANS[4][0] = 9;
        ANS[5][0] = ANS[6][0] = 10;
        cur++;
        while (cur < n) {
            put3(cur, cur);
            cur += 3;
        }
        out();
        return 0;
    }
    if (n == 11) {
        put4(0, 0);
        put4(4, 4);
        put3(8, 8);
        ll x = 12;
        for (q = 8; q < 11; q++) {
            for (w = 0; w < 8; w += 2) {
                ANS[q][w] = ANS[q][w + 1] = x;
                ANS[w][q] = ANS[w + 1][q] = x;
                x++;
            }
        }
        out();
        return 0;
    }
    if (n <= 2) {
        cout << -1;
        return 0;
    }
    if (n == 5) {
        cout << "abbcc" << endl;
        cout << "add.e" << endl;
        cout << "b..fe" << endl;
        cout << "b..fg" << endl;
        cout << "aabbg" << endl;
        return 0;
    }
    if (n % 3 == 0) {
        while (cur < n) {
            put3(cur, cur);
            cur += 3;
        }
    }
    else {
        for (q = 0; q < n % 4; q++) {
            put5(cur, cur);
            cur += 5;
        }
        while (cur != n) {
            put4(cur, cur);
            cur += 4;
        }
    }
    out();
    return 0;
}


Measured memory_bytes: 8576