//
// Created by yamunaku on 2019/12/28.
//

#include <bits/stdc++.h>

using namespace std;

#define rep(i, n) for(int i = 0; i < (n); i++)
#define repl(i, l, r) for(int i = (l); i < (r); i++)
#define per(i, n) for(int i = ((n)-1); i >= 0; i--)
#define perl(i, l, r) for(int i = ((r)-1); i >= (l); i--)
#define all(x) (x).begin(),(x).end()
#define MOD9 998244353
#define MOD1 1000000007
#define IINF 1000000000
#define LINF 1000000000000000000
#define SP <<" "<<
#define CYES cout<<"Yes"<<endl
#define CNO cout<<"No"<<endl
#define CFS cin.tie(0);ios::sync_with_stdio(false)
#define CST(x) cout<<fixed<<setprecision(x)

using ll = long long;
using ld = long double;
using vi = vector<int>;
using mti = vector<vector<int>>;
using vl = vector<ll>;
using mtl = vector<vector<ll>>;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
template<typename T>
using heap = priority_queue<T, vector<T>, function<bool(const T, const T)>>;

int main(){
    // CFS;
    int n;
    cin >> n;
    if(n == 2){
        cout << -1 << endl;
        return 0;
    }
    if(n==7){
        vector<string> s = {
                "aabbcc.",
                "..x..xa",
                "..x..xa",
                "yy.yy.b",
                "..x..xb",
                "..x..xc",
                "yy.yy.c"
        };
        rep(i, n){
            rep(j, n){
                cout << s[i][j];
            }
            cout << endl;
        }
        return 0;
    }
    if(n % 3 == 0){
        vector<string> s = {
                ".aa",
                "b..",
                "b.."
        };
        rep(i, n){
            rep(j, n){
                cout << s[i % 3][j % 3];
            }
            cout << endl;
        }
    }else if(n % 4 == 0){
        vector<string> s = {
                "aacd",
                "bbcd",
                "cdaa",
                "cdbb"
        };
        rep(i, n){
            rep(j, n){
                cout << s[i % 4][j % 4];
            }
            cout << endl;
        }
    }else if(n % 6 == 4){
        vector<string> s = {
                "aacd",
                "bbcd",
                "cdaa",
                "cdbb"
        };
        vector<string> t = {
                "abb..x",
                "a.c..x",
                "ddcyy.",
                "..xabb",
                "..xa.c",
                "yy.ddc"
        };
        rep(i, n){
            rep(j, n){
                if(i / 6 == j / 6){
                    if(i / 6 == (n - 1) / 6) cout << s[i % 6][j % 6];
                    else cout << t[i % 6][j % 6];
                }else{
                    cout << ".";
                }
            }
            cout << endl;
        }
    }else if(n % 6 == 5){
        vector<string> s = {
                "..abc",
                "..abc",
                "aawwx",
                "bbv.x",
                "ccvyy"
        };
        vector<string> t = {
                "abb..x",
                "a.c..x",
                "ddcyy.",
                "..xabb",
                "..xa.c",
                "yy.ddc"
        };
        rep(i, n){
            rep(j, n){
                if(i / 6 == j / 6){
                    if(i / 6 == (n - 1) / 6) cout << s[i % 6][j % 6];
                    else cout << t[i % 6][j % 6];
                }else{
                    cout << ".";
                }
            }
            cout << endl;
        }
    }else if(n % 12 == 2){
        vector<string> s = {
                "aacd....",
                "bbcd....",
                "cdaa....",
                "cdbb....",
                "....aacd",
                "....bbcd",
                "....cdaa",
                "....cdbb"
        };
        vector<string> t = {
                "abb..x",
                "a.c..x",
                "ddcyy.",
                "..xabb",
                "..xa.c",
                "yy.ddc"
        };
        rep(i, n){
            rep(j, n){
                if(i >= n - 8 && j >= n - 8){
                    cout << s[i - (n - 8)][j - (n - 8)];
                }else if(i / 6 == j / 6){
                    cout << t[i % 6][j % 6];
                }else{
                    cout << ".";
                }
            }
            cout << endl;
        }
    }else if(n % 12 == 7){
        vector<string> s = {
                "aacd.........",
                "bbcd.........",
                "cdaa.........",
                "cdbb.........",
                "....aacd.....",
                "....bbcd.....",
                "....cdaa.....",
                "....cdbb.....",
                "..........abc",
                "..........abc",
                "........aawwx",
                "........bbv.x",
                "........ccvyy"
        };
        vector<string> t = {
                "abb..x",
                "a.c..x",
                "ddcyy.",
                "..xabb",
                "..xa.c",
                "yy.ddc"
        };
        rep(i, n){
            rep(j, n){
                if(i >= n - 13 && j >= n - 13){
                    cout << s[i - (n - 13)][j - (n - 13)];
                }else if(i / 6 == j / 6){
                    cout << t[i % 6][j % 6];
                }else{
                    cout << ".";
                }
            }
            cout << endl;
        }
    }else if(n % 12 == 1){
        vector<string> s = {
                "..abc",
                "..abc",
                "aawwx",
                "bbv.x",
                "ccvyy"
        };
        vector<string> t = {
                "aacd",
                "bbcd",
                "cdaa",
                "cdbb"
        };
        rep(i, n){
            rep(j, n){
                if(i >= n - 5 && j >= n - 5){
                    cout << s[i - (n - 5)][j - (n - 5)];
                }else if(i / 4 == j / 4){
                    cout << t[i % 4][j % 4];
                }else{
                    cout << ".";
                }
            }
            cout << endl;
        }
    }else{
        assert(false);
    }
    return 0;
}

Measured memory_bytes: 1280