#include <iostream>
#include <sstream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <memory>
#include <complex>
#include <numeric>
#include <cstdio>
#include <iomanip>
#include <random>

#define REP(i,m,n) for(int i=int(m);i<int(n);i++)
#define RREP(i,m,n) for(int i=int(n)-1;i>=int(m);--i)
#define EACH(i,c) for (auto &(i): c)
#define all(c) begin(c),end(c)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort(begin(c),end(c))
#define pb emplace_back
#define MP make_pair
#define SZ(a) int((a).size())
//#define int long long

#ifdef LOCAL
#define DEBUG(s) cout << (s) << endl
#define dump(x)  cerr << #x << " = " << (x) << endl
#define BR cout << endl;
#else
#define DEBUG(s) do{}while(0)
#define dump(x) do{}while(0)
#define BR 
#endif
using namespace std;

using UI = unsigned int;
using UL = unsigned long;
using LL = long long;
using ULL = unsigned long long;
using VI = vector<int>;
using VVI = vector<VI>;
using VLL = vector<LL>;
using VVLL = vector<VLL>;
using VS = vector<string>;
using PII = pair<int,int>;
using VP = vector<PII>;
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; }

constexpr double EPS = 1e-10;
//constexpr double PI  = acos(-1.0);
//constexpr int INF = INT_MAX;
constexpr int MOD = 1'000'000'007;
//inline void modAdd(LL &l, LL &r) {l = (l + r) % MOD;}

template<class T> inline T sqr(T x) {return x*x;}

void create4(vector<vector<char>> &b, int off) {
    b[off][off] = b[off+1][off] = 'a';
    b[off][off+1] = b[off+1][off+1] = 'b';
    b[off][off+2] = b[off][off+3] = 'c';
    b[off+1][off+2] = b[off+1][off+3] = 'd';
    b[off+2][off] = b[off+2][off+1] = 'e';
    b[off+3][off] = b[off+3][off+1] = 'f';
    b[off+2][off+2] = b[off+3][off+2] = 'g';
    b[off+2][off+3] = b[off+3][off+3] = 'h';
}

void create5(vector<vector<char>> &b, int off) {
    b[off][off] = b[off][off+1] = 'a';
    b[off][off+3] = b[off][off+4] = 'b';
    b[off+2][off+3] = b[off+2][off+4] = 'c';
    b[off+3][off+2] = b[off+3][off+3] = 'd';
    b[off+4][off+1] = b[off+4][off+2] = 'e';
    b[off][off+2] = b[off+1][off+2] = 'f';
    b[off+1][off] = b[off+2][off] = 'g';
    b[off+1][off+1] = b[off+2][off+1] = 'h';
    b[off+3][off] = b[off+4][off] = 'i';
    b[off+3][off+4] = b[off+4][off+4] = 'j';
}

void create3(vector<vector<char>> &b, int offx, int offy) {
    b[offx][offy+1] = b[offx][offy+2] = 'a';
    b[offx+1][offy] = b[offx+2][offy] = 'b';
}

void create6(vector<vector<char>> &b, int off) {
    create3(b,off, off);
    create3(b,off+3, off);
    create3(b,off, off+3);
    create3(b,off+3, off+3);
}

void create7(vector<vector<char>> &b, int off) {
    create6(b,off);
    b[off][off+6] = b[off+1][off+6] = 'c';
    b[off+2][off+6] = b[off+3][off+6] = 'd';
    b[off+4][off+6] = b[off+5][off+6] = 'e';
    b[off+6][off] = b[off+6][off+1] = 'f';
    b[off+6][off+2] = b[off+6][off+3] = 'g';
    b[off+6][off+4] = b[off+6][off+5] = 'h';
}

void solve() {
    LL n;
    cin >> n;
    vector<vector<char>> b(n,vector<char>(n, '.'));

    if (n <= 2) {
        cout << -1 << endl;
        return;
    } else if (n == 3) {
        create3(b,0,0);
    } else if (n == 4) {
        create4(b,0);
    } else if (n == 5) {
        create5(b,0);
    } else if (n == 6) {
        create6(b,0);
    } else if (n == 7) {
        create7(b,0);
    } else if (n == 8) {
        create4(b,0);
        create4(b,4);
    } else if (n == 9) {
        REP(i,0,3) create3(b,i*3,i*3);
    } else if (n == 10) {
        REP(i,0,2) create5(b,i*5);
    } else if (n == 11) {
        create4(b,0);
        create7(b,4);
    } else {
        REP(i,0,n%4) create5(b,i*5);
        int index = 5 * (n % 4);
        while (index < n) {
            create4(b,index);
            index += 4;
        }
    }
    REP(i,0,n) {
        REP(j,0,n) cout << b[i][j];
        cout << endl;
    }
}

signed main() {
    solve();
    
    return 0;
}

Measured memory_bytes: 2176