#include <bits/stdc++.h>
#define all(vec) vec.begin(), vec.end()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
constexpr ll INF = (1LL << 30) - 1LL;
constexpr ll LINF = (1LL << 60) - 1LL;
constexpr ll MOD = 1e9 + 7;
template <typename T> void chmin(T &a, T b) { a = min(a, b); }
template <typename T> void chmax(T &a, T b) { a = max(a, b); }
vector<string> s;
void set3(int y, int x) {
    for (int j = 0; j < 3; j++) {
        s[y][x + j * 2] = 'a' + j * 2;
        s[y + 1][x + j * 2] = 'a' + j * 2;
        s[y + 2][x + j * 2] = 'b' + j * 2;
        s[y + 2][x + j * 2 + 1] = 'b' + j * 2;
    }
    for (int j = 0; j < 3; j++) {
        s[y + 3][x + j * 2] = 'a' + j * 2;
        s[y + 3][x + j * 2 + 1] = 'a' + j * 2;
        s[y + 4][x + j * 2 + 1] = 'b' + j * 2;
        s[y + 5][x + j * 2 + 1] = 'b' + j * 2;
    }
}
void set2(int y, int x) {
    for (int j = 0; j < 2; j++) {
        for (int k = 0; k < 2; k++) {
            s[y + j * 3][x + k * 3] = 'g';
            s[y + j * 3 + 1][x + k * 3] = 'g';
            s[y + j * 3 + 2][x + k * 3 + 1] = 'h';
            s[y + j * 3 + 2][x + k * 3 + 2] = 'h';
        }
    }
}
void set1(int y, int x) {
    for (int j = 0; j < 2; j++) {
        s[y + j * 3][x + j * 3] = 'g';
        s[y + j * 3 + 1][x + j * 3] = 'g';
        s[y + j * 3 + 2][x + j * 3 + 1] = 'h';
        s[y + j * 3 + 2][x + j * 3 + 2] = 'h';
    }
}
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    if (n == 2) {
        cout << -1 << endl;
        return 0;
    }
    s.clear();
    s.resize(n);
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            s[i].push_back('.');
        }
    }
    if (n % 6 == 1 || n % 6 == 2) {
        for (int i = 1; i < n - 1; i += 2) {
            if ((i / 2) % 2 == 0) {
                s[0][i] = 'y';
                s[0][i + 1] = 'y';
            } else {
                s[0][i] = 'z';
                s[0][i + 1] = 'z';
            }
        }
        for (int i = 1; i < n - 1; i += 2) {
            if ((i / 2) % 2 == 0) {
                s[i][0] = 'y';
                s[i + 1][0] = 'y';
            } else {
                s[i][0] = 'z';
                s[i + 1][0] = 'z';
            }
        }
        for (int i = 0; i < n / 6; i++) {
            for (int j = 0; j < n / 6; j++) {
                if (i == j) {
                    continue;
                }
                set3(i * 6 + 1, j * 6 + 1);
            }
        }
        if (n % 6 == 1) {
            for (int i = 0; i < n / 6; i++) {
                set2(i * 6 + 1, i * 6 + 1);
            }
        } else {
            for (int i = 0; i < n / 6; i++) {
                set1(i * 6 + 1, i * 6 + 1);
            }
            for (int i = 1; i < n - 1; i += 2) {
                if ((i / 2) % 2 == 0) {
                    s[n - 1][i] = 'y';
                    s[n - 1][i + 1] = 'y';
                } else {
                    s[n - 1][i] = 'z';
                    s[n - 1][i + 1] = 'z';
                }
            }
            for (int i = 1; i < n - 1; i += 2) {
                if ((i / 2) % 2 == 0) {
                    s[i][n - 1] = 'y';
                    s[i + 1][n - 1] = 'y';
                } else {
                    s[i][n - 1] = 'z';
                    s[i + 1][n - 1] = 'z';
                }
            }
        }
    } else if (n % 6 == 4 || n % 6 == 5) {
        for (int i = 0; i < n / 6; i++) {
            set3(i * 6, i * 6);
        }
        if (n % 6 == 4) {
            for (int i = n - 4; i < n; i++) {
                for (int j = 0; j < 4; j++) {
                    s[i].pop_back();
                }
            }
            s[n - 4] += "aabc";
            s[n - 3] += "ddbc";
            s[n - 2] += "bcaa";
            s[n - 1] += "bcdd";
        } else {
            for (int i = n - 5; i < n; i++) {
                for (int j = 0; j < 5; j++) {
                    s[i].pop_back();
                }
            }
            s[n - 5] += "abbcc";
            s[n - 4] += "ad..b";
            s[n - 3] += "bd..b";
            s[n - 2] += "b.ddc";
            s[n - 1] += "ccaac";
        }
    } else if (n % 3 == 0) {
        for (int i = 0; i < n / 3; i++) {
            s[i * 3][i * 3] = 'a';
            s[i * 3][i * 3 + 1] = 'a';
            s[i * 3 + 1][i * 3 + 2] = 'b';
            s[i * 3 + 2][i * 3 + 2] = 'b';
        }
    }
    for (int i = 0; i < n; i++) {
        cout << s[i] << endl;
    }
}


Measured memory_bytes: 2304