#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<int, int> i_i;
ll INF = 1e12+10;
#define reps(i,s,n) for(int i = s; i < n; i++)
#define rep(i,n) reps(i,0,n)
vector<pair<ll, ll> > pairs;
#define print1(x) cerr << "x = " << x << endl;
#define print2(x, y) cerr<< "x,y = "  << x << "," << y << endl;
#define print3(x, y, z) cerr << "x,y,z = " << x << "," << y << "," << z << endl;
#define print4(x, y, z, w) cerr << "x,y,z,w = " << x << "," << y << "," << z << "," << w << endl;

ll A[400000];
ll cnt[64];

ll mod = ll(1e9 + 7);

#define MAX_N 20
int board[MAX_N * MAX_N];
int tate[MAX_N];
int yoko[MAX_N];
int pos[MAX_N];
int num = 0;
#define SPACE 0
#define TATE 1
#define YOKO 2

int set0(int t, int i, int n, int m){
    if (i == 1){
        if (board[t] > 0 ||
            board[t + n] > 0 ||
            tate[t%n] >= m ||
            yoko[t/n] >= m ||
            yoko[(t + n)/n] >= m){
            return 0;
        }

        board[t] = num + 1;
        board[t + n] = num + 1;
        pos[num++] = t;
        tate[t%n]++;
        yoko[t/n]++;
        yoko[(t + n)/n]++;
    }
    if (i == 2){
        if (board[t] > 0 ||
            board[t + 1] > 0 ||

            tate[t%n] >= m ||
            tate[(t+1)%n] >= m ||
            yoko[t/n] >= m){
            return 0;
        }

        board[t] = num + 1;
        board[t + 1] = num + 1;
        pos[num++] = t + n * n;
        tate[t%n]++;
        tate[(t+1)%n]++;
        yoko[t/n]++;
    }
    return 1;
}

int unset(int t, int i, int n){
    if (i == 1){
        board[t] = 0;
        assert(t + n < n * n);
        board[t + n] = 0;
        --num;
        tate[t%n]--;
        yoko[t/n]--;
        yoko[(t + n)/n]--;
    }
    if (i == 2){
        board[t] = 0;
        board[t + 1] = 0;
        assert(t + 1 < n * n);
        --num;
        tate[t%n]--;
        tate[(t+1)%n]--;
        yoko[t/n]--;
    }
    return 0;
}


int solve(int n, int m, int t)
{
    int res = -1;
    if (t == n * n){
        for (int i = 0; i < n; i++){
            if (tate[i] != m){
                return 0;
            }
        }
        return 1;
    }
    //fprintf(stderr, "t = %d\n" ,t);
    if (board[t] != 0){
        if (t%n == n - 1 && yoko[t/n] != m){
            return 0;
        }
        if (solve(n, m, t + 1)){
            return 1;
        } else {
            return 0;
        }
    }
    for (int i = 0; i <= 2; i++){
        if (i == 1 && t/n == n-1)continue;
        if (i == 2 && t%n == n-1)continue;
        if (i != 0 && board[t])continue;
        
        //fprintf(stderr, "i = %d\n", i);
        if (set0(t, i, n, m)){
            if (t%n != n - 1 || yoko[t/n] == m){
                if (solve(n, m, t + 1)){
                   return 1;
                }
            }
            //fprintf(stderr, " t = %d, i = %d, res = %d\n", t, i, res);    
            unset(t, i, n);

        }
    }
    return 0;
}
int main()
{
    int N;
    cin >> N;
#if 0
    int M = 3;
    
    int res = solve(N, M, 0);
    fprintf(stderr, "res = %d\n", res);
    for (int i = 0; i < num; i++){
        fprintf(stderr, "%d, %d, %d\n", i, pos[i]%(N*N), pos[i]/(N*N) + 1);
    }
    for (int i = 0; i < N; i++){
        for (int j = 0; j < N; j++){
            fprintf(stderr, "%c", board[i * N + j] ? board[i * N + j] + 'a': '.');
        }
        fprintf(stderr, "\n");
    }
        
                
    exit(1);
#endif
    string S7[7] = {
    "....bcd",
    "....bcd",
    "....efg",
    "....efg",
    "hhii..j",
    "kkll..j",
    "mmnnoo."};
    string S6[6] = {
    "...bcd",
    "...bcd",
    "e.ff.g",
    "ehh..g",
    "iij.kk",
    "lljmm."};
    string S5[5] = {
    "..bcd",
    "..bcd",
    "eefgg",
    "hhf.i",
    "jjkki"};
    string S4[4] = {
        "bcdd",
        "bcee",
        "ffgh",
        "iigh"};
    if (N == 2){
        
        cout << -1 << endl;
        return 0;
    } else if (N == 3){
        string S[3] = {"abb","a.d","ccd"};

        for (int i = 0; i < N; i++){
            for (int j = 0; j < N/3; j++){
                cout << S[i % 3];
            }
            cout << endl;
        }
        return 0;
    } 
    int i;
    for (i = 0; i < (N/4 - 1) * 4; i++){
        int pre = 4 * (i/4);
        for (int j = 0; j < pre; j++){
            cout << ".";
        }
        cout << S4[i % 4];
        for (int j = 0; j < N - pre - 4; j++){
            cout << ".";
        }
        cout << endl;
    }
    int res = N - i;
    for (i = 0; i < res; i++){    
        for (int j = 0; j < N - res; j++){
            cout << ".";
        }
        if (res == 4){
            cout << S4[i % 4];
        } else if (res == 5){
            cout << S5[i % 5];
        } else if (res == 6){
            cout << S6[i % 6];
        } else if (res == 7){
            cout << S7[i % 7];
        }
        cout << endl;
    }

    return 0;
}


Measured memory_bytes: 1280