/* be name khoda */

// #define stream_enable
// #define long_enable
#include <iostream>
#include <algorithm>
#include <cstring>
#include <numeric>
#include <iomanip>
#include <sstream>
#include <vector>
#include <queue>
#include <set>
#include <map>
using namespace std;

#ifdef stream_enable
#define cin sss
#endif
#ifdef long_enable
typedef long long int ll;
#else
typedef int ll;
#endif

typedef pair<ll, ll> pii;
typedef pair<pii, ll> ppi;
typedef pair<ll, pii> pip;
typedef vector<ll> vi;
typedef vector<pii> vpii;

const ll MOD = 1000000007;
const long long BIG = 1446803456761533460;
const int Big = 336860180;

#define F first
#define S second
#define pb push_back
#define eb emplace_back
#define all(x) (x).begin(), (x).end()

#define debug(x) cout << #x << " -> " << (x) << endl
#define debug2(x, y) cout << #x << ' ' << #y << " -> " << (x) << ' ' << (y) << endl
#define debug3(x, y, z) cout << #x << ' ' << #y << ' ' << #z << " -> " << (x) << ' ' << (y) << ' ' << (z) << endl
#define debug4(x, y, z, t) cout << #x << ' ' << #y << ' ' << #z << ' ' << #t << " -> " << (x) << ' ' << (y) << ' ' << (z) << ' ' << (t) << endl
#define debugp(x) cout << #x << " -> " << "(" << (x).F << ", " << (x).S << ")" << endl
#define debuga(x, n) cout << #x << " -> "; fori (i1_da, n) { cout << (x)[i1_da] << ' '; } cout << endl
#define debugap(x, n) cout << #x << " ->\n"; fori (i1_dap, n) { cout << "(" << (x)[i1_dap].F << ", " << (x)[i1_dap].S << ")\n"; } cout << endl
#define debugaa(x, n, m) cout << #x << " ->\n"; fori (i1_daa, n) { fori (i2_daa, m) { cout << (x)[i1_daa][i2_daa] << ' '; } cout << '\n'; } cout << endl
#define debugav(x, n) cout << #x << " ->\n"; fori (i1_dav, n) { fori (i2_dav, (x)[i1_dav].size()) { cout << (x)[i1_dav][i2_dav] << ' '; } cout << '\n'; } cout << endl
#define debugia(x, n) cout << #x << " ->\n"; fori (i1_dia, n) { cout << i1_dia << " : " << (x)[i1_dia] << '\n'; } cout << endl

#define forifrom(i, s, n) for(ll i = (s); i < (n); ++i)
#define forirto(i, n, e) for(ll i = (n) - 1; i >= (e); --i)
#define fori(i, n) forifrom (i, 0, n)
#define forir(i, n) forirto (i, n, 0)

#define smin(a, b) a = min(a, (b))
#define smax(a, b) a = max(a, (b))

#define Add(a, b) a = ((a) + (b)) % MOD
#define Mul(a, b) a = (1LL * (a) * (b)) % MOD

stringstream sss;

// -----------------------------------------------------------------------

const ll maxn = 1010;

ll n;
char R[maxn][maxn];
string G[8][7] = {{},{},{},
    {"aab",
     "b.b",
     "baa"},
    {"aacd",
     "bbcd",
     "cdaa",
     "cdbb"},
    {"aabba",
     "bcc.a",
     "b..cb",
     "a..cb",
     "abbaa"},
    {"aabcc.",
     "b.b..c",
     "baa..c",
     "c..aab",
     "c..b.b",
     ".ccbaa"},
    {"aabbaa.",
     "ccd...a",
     "d.d...a",
     "dcc...b",
     "...ccdb",
     "...d.da",
     "...dcca"}};

void MAIN() {

    cin >> n;
    if (n == 2) {cout << "-1\n"; return;}
    memset(R, '.', sizeof R);
    ll i = n;
    while (i >= 8) {
        i -= 4;
        fori (j, 4) fori (k, 4) R[i + j][i + k] = G[4][j][k];
    }
    fori (j, i) fori (k, i) R[j][k] = G[i][j][k];
    fori (i, n) {
        fori (j, n) {
            cout << R[i][j];
        }
        cout << '\n';
    }

}

// -----------------------------------------------------------------------

int main() {
    ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
    cout << fixed << setprecision(10);
    sss << R"(

    )";
    MAIN();
    return 0;
}

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <queue>
#include <bitset>
#include <stack>
#include <functional>

#ifdef LOCAL
    #define eprintf(...) fprintf(stderr, __VA_ARGS__)
#else
    #define eprintf(...) 42
#endif

#define rep(i, n) for(int i = 0, i##_len = (n); i < i##_len; ++i)
#define repp(i, m, n) for(int i = m, i##_len = (n); i < i##_len; ++i)
#define reprev(i, n) for(ll i = (n-1LL); i >= 0; --i)
#define all(x) (x).begin(), (x).end()
template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }
template <class T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair <ll,ll> P;
typedef long double ld;

int main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    if (n <= 2) {
        cout << "-1\n";
    } else if (n % 3 == 0) {
        rep (i, n) {
            rep (j, n) {
                if (i / 3 == j / 3 && ((i % 3 == 0) ^ (j % 3 == 0))) cout << 'a';
                else cout << '.';
            }
            cout << "\n";
        }
    } else if (n == 7) {
        cout << "abb...a\n"
             << "a.a...a\n"
             << "bba...c\n"
             << "...abbc\n"
             << "...a.ab\n"
             << "...bbab\n"
             << "bbaacc.\n";
    } else if (n == 11) {
        cout << "bccaabbccaa\n"
             << "babb...abbc\n"
             << "ca.a...a.ac\n"
             << "cbba...bbab\n"
             << "baccbcc...b\n"
             << "ba.ab.b...a\n"
             << "accaccb...a\n"
             << "a...baacaab\n"
             << "b...b.bc.cb\n"
             << "b...aabaaca\n"
             << "ccaabbccbba\n";
    } else {
        int a, b;
        for (int i = n / 5; i >= 0; i--) {
            if ((n - 5 * i) % 4 == 0) {
                a = i;
                b = (n - 5 * i) / 4;
                break;
            } 
        }
        // eprintf("a=%d, b=%d\n", a, b);
        vector<string> s4 = {"aaca", "bbca", "acbb", "acaa"},
                       s5 = {"aacca", "c.bba", "cb..c", "ab..c", "accaa"};
        rep (i, n) {
            rep (j, n) {
                if (i / 5 == j / 5 && i / 5 < a) {
                    // cout << 1;
                    cout << s5[i % 5][j % 5];
                } else if ((i - 5 * a) / 4 == (j - 5 * a) / 4 && i - 5 * a >= 0 && j - 5 * a >= 0) {
                    // cout << 2;
                    cout << s4[(i - 5 * a) % 4][(j - 5 * a) % 4];
                } else {
                    // cout << 3;
                    cout << '.';
                }
            }
            cout << "\n";
        }
    }
    return 0;
}