#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
template<class T>
inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

template<class T>
inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
//const ll mod = 1000000007;
string three[3];
string four[4];
string five[5];
string six[6];
string seven[7];
string ans[1005];
int main() {
    //cout.precision(10);
    cin.tie(0);
    ios::sync_with_stdio(false);
    three[0] = "a..";
    three[1] = "a..";
    three[2] = ".bb";
    four[0] = "aabc";
    four[1] = "ddbc";
    four[2] = "ghee";
    four[3] = "ghff";
    five[0] = "aabbc";
    five[1] = "dde.c";
    five[2] = "ffegg";
    five[3] = "..hij";
    five[4] = five[3];
    six[0] = "aabb..";
    six[1] = "b..zz.";
    six[2] = "ba....";
    six[3] = ".a..aa";
    six[4] = "..a..b";
    six[5] = "..a..b";
    seven[0] = "...abcc";
    seven[1] = "dd.ab..";
    seven[2] = "eeffgg.";
    seven[3] = "hhij...";
    seven[4] = "..ij.kk";
    seven[5] = "..l.m.n";
    seven[6] = seven[5];
    int N;
    cin >> N;
    if(N == 2) {
        cout << -1 << endl;
        return 0;
    }
    if(N == 3) {
        for(int i = 0; i < N; i++) {
            cout << three[i] << endl;
        }
    }
    if(N == 4) {
        for(int i = 0; i < N; i++) {
            cout << four[i] << endl;
        }
    }
    if(N == 5) {
        for(int i = 0; i < N; i++) {
            cout << five[i] << endl;
        }
    }
    if(N == 6) {
        for(int i = 0; i < N; i++) {
            cout << six[i] << endl;
        }
    }
    if(N == 7) {
        for(int i = 0; i < N; i++) {
            cout << seven[i] << endl;
        }
    }
    if(N == 11) {
        for(int i = 0; i < N; i++) {
            for(int j = 0; j < N; j++) {
                ans[i].push_back('.');
            }
        }
        for(int i = 0; i < 4; i++) {
            for(int j = 0; j < 4; j++) {
                ans[i][j] = four[i][j];
            }
        }
        for(int i = 0; i < 7; i++) {
            for(int j = 0; j < 7; j++) {
                ans[4+i][4+j] = seven[i][j];
            }
        }
        for(int i = 0; i < N; i++) cout << ans[i] << endl;
        return 0;
    }
    if(N >= 8 and N != 11) {
        for(int i = 0; i < N; i++) {
            for(int j = 0; j < N; j++) {
                ans[i].push_back('.');
            }
        }
        for(ll FOUR = 0; ; FOUR++) {
            if((N - 4 * FOUR) % 5 != 0) continue;
            ll FIVE = (N - 4 * FOUR) / 5;
            for(int i = 0; i < FOUR; i++) {
                for(int j = 0; j < 4; j++) {
                    for(int k = 0; k < 4; k++) {
                        ans[i*4+j][i*4+k] = four[j][k];
                    }
                }
            }
            for(int i = 0; i < FIVE; i++) {
                for(int j = 0; j < 5; j++) {
                    for(int k = 0; k < 5; k++) {
                        ans[FOUR*4+5*i+j][FOUR*4+5*i+k] = five[j][k];
                    }
                }
            }
            for(int i = 0; i < N; i++) {
                cout << ans[i] << endl;
            }
            return 0;
        }
    }
    return 0;
}


Measured memory_bytes: 2304