// Dmitry _kun_ Sayutin (2019)

#include <bits/stdc++.h>

using std::cin;
using std::cout;
using std::cerr;

using std::vector;
using std::map;
using std::array;
using std::set;
using std::string;
using std::queue;

using std::pair;
using std::make_pair;

using std::tuple;
using std::make_tuple;
using std::get;

using std::min;
using std::abs;
using std::max;
using std::swap;

using std::unique;
using std::sort;
using std::generate;
using std::reverse;
using std::min_element;
using std::max_element;

#ifdef LOCAL
#define LASSERT(X) assert(X)
#else
#define LASSERT(X) {}
#endif

template <typename T>
T input() {
    T res;
    cin >> res;
    LASSERT(cin);
    return res;
}

template <typename IT>
void input_seq(IT b, IT e) {
    std::generate(b, e, input<typename std::remove_reference<decltype(*b)>::type>);
}

#define SZ(vec)         int((vec).size())
#define ALL(data)       data.begin(),data.end()
#define RALL(data)      data.rbegin(),data.rend()
#define TYPEMAX(type)   std::numeric_limits<type>::max()
#define TYPEMIN(type)   std::numeric_limits<type>::min()

int main() {
    std::iostream::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    // code here
    int n = input<int>();

    if (n == 7) {
        
        cout << "....abc\n"
            "....abc\n"
            "....def\n"
            "....def\n"
            "gghh..i\n"
            "jjkk..i\n"
            "llmmnn.\n";
        return 0;
    } else if (n == 11) {

        cout << "........abc\n"
            "........abc\n"
            "........def\n"
            "........def\n"
            "........ghi\n"
            "........ghi\n"
            "....jjkl...\n"
            "....mmkl...\n"
            "nnoo..pp...\n"
            "qqrr..ss...\n"
            "ttuuvv.....\n";
        return 0;

    }
    
    vector<vector<char>> ans(n, vector<char>(n + 3, '.'));

    bool has_ans = false;
    for (int a = 0; a <= 1000 and not has_ans; ++a)
        for (int b = 0; b <= 1000 and not has_ans; ++b) {
            if (5 * a + 4 * b == n) {
                has_ans = true;

                for (int i = 0; i < a; ++i) {
                    memcpy(&ans[5 * i + 0][5 * i + 0], "abcc.", 5);
                    memcpy(&ans[5 * i + 1][5 * i + 0], "ab.dd", 5);
                    memcpy(&ans[5 * i + 2][5 * i + 0], "zzfee", 5);
                    memcpy(&ans[5 * i + 3][5 * i + 0], "k.f.u", 5);
                    memcpy(&ans[5 * i + 4][5 * i + 0], "ktt.u", 5);
                }
                
                for (int i = 0; i < b; ++i) {
                    ans[5 * a + 4 * i + 0][5 * a + 4 * i + 0] = 'e';
                    ans[5 * a + 4 * i + 0][5 * a + 4 * i + 1] = 'e';
                    ans[5 * a + 4 * i + 1][5 * a + 4 * i + 0] = 'f';
                    ans[5 * a + 4 * i + 1][5 * a + 4 * i + 1] = 'f';

                    ans[5 * a + 4 * i + 2][5 * a + 4 * i + 2] = 'g';
                    ans[5 * a + 4 * i + 2][5 * a + 4 * i + 3] = 'g';
                    ans[5 * a + 4 * i + 3][5 * a + 4 * i + 2] = 'h';
                    ans[5 * a + 4 * i + 3][5 * a + 4 * i + 3] = 'h';

                    ans[5 * a + 4 * i + 0][5 * a + 4 * i + 2] = 'i';
                    ans[5 * a + 4 * i + 1][5 * a + 4 * i + 2] = 'i';
                    ans[5 * a + 4 * i + 0][5 * a + 4 * i + 3] = 'j';
                    ans[5 * a + 4 * i + 1][5 * a + 4 * i + 3] = 'j';

                    ans[5 * a + 4 * i + 2][5 * a + 4 * i + 0] = 'k';
                    ans[5 * a + 4 * i + 3][5 * a + 4 * i + 0] = 'k';
                    ans[5 * a + 4 * i + 2][5 * a + 4 * i + 1] = 'l';
                    ans[5 * a + 4 * i + 3][5 * a + 4 * i + 1] = 'l';
                }
            }
    }
    
    if (not has_ans and n % 3 == 0) {
        has_ans = true;
        for (int i = 0; i < n / 3; ++i) {
            ans[3 * i + 0][3 * i + 0] = 'a';
            ans[3 * i + 0][3 * i + 1] = 'a';

            ans[3 * i + 0][3 * i + 2] = 'b';
            ans[3 * i + 1][3 * i + 2] = 'b';

            ans[3 * i + 2][3 * i + 2] = 'c';
            ans[3 * i + 2][3 * i + 1] = 'c';

            ans[3 * i + 2][3 * i + 0] = 'd';
            ans[3 * i + 1][3 * i + 0] = 'd';
        }
    }

    if (not has_ans) {
        cout << "-1\n";
        return 0;
    }
    
    for (int i = 0; i < n; ++i) {
        ans[i][n] = '\0';
        cout << &ans[i][0] << "\n";
    }

    return 0;
}


Measured memory_bytes: 2304