#include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/range/adaptor/reversed.hpp>

using namespace std;
typedef long long int ll;

#define PI (acos(-1))
#define REP(i,n) for(ll (i)=0;(i)<(n);(i)++)

#define dump(x)  cerr << #x << " = " << (x) << endl;
#define dumparr(x) cerr << #x ; for(auto elem: x){cerr << " " << elem;} cerr << endl;
#define dumppairs(x) cerr << #x ; for(auto elem: x){cerr << "(" << elem.first << " " << elem.second << ") ";} cerr << endl;
#define dumpline cerr << "**********************" << endl;
#define dumpwline(x) cerr << "******** " << #x << "=" << (x) << " ********" << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
#define ARRAY_LENGTH(array) (sizeof(array) / sizeof(array[0]))

ll bunkai(ll m){
    if (m % 4 == 0){ // 8 12 16
        return m/4;
    }
    if (m % 4 == 1){ // 9 13 17
        return (m-5)/4;
    }
    if (m % 4 == 2){ // 10 14 18
        return (m-10)/4;
    }
    if (m % 4 == 3){ // 8 11 14
        return (m-15)/4;
    }
}


int main(void){
    ll n; cin >> n;
    if (n <= 2){
        cout << -1 << endl;
        return 0;
    }
    if (n == 7){
        cout << ".aabcc." << endl;
        cout << "d..b..l" << endl;
        cout << "d.xx..l" << endl;
        cout << "ee..ykk" << endl;
        cout << "f...y.j" << endl;
        cout << "f..h..j" << endl;
        cout << ".gghii." << endl;
        return 0;

    }

    string b4_0 = "aabd";
    string b4_1 = "ccbd";
    string b4_2 = "efgg";
    string b4_3 = "efhh";
    vector <string> m4 = {b4_0, b4_1, b4_2, b4_3};

    if (n == 11){
        cout << ".aabcc." << "...." <<endl;
        cout << "d..b..l" << "...." <<endl;
        cout << "d.xx..l" << "...." <<endl;
        cout << "ee..ykk" << "...." <<endl;
        cout << "f...y.j" << "...." <<endl;
        cout << "f..h..j" << "...." <<endl;
        cout << ".gghii." << "...." <<endl;
        string pad_first = ".......";
        REP(j, 4){
            cout << pad_first << m4[j] <<  endl;
        }

        return 0;
    }
    string b5_0 = "abbcc";
    string b5_1 = "axx.d";
    string b5_2 = "h..yd";
    string b5_3 = "h..ye";
    string b5_4 = "ggffe";
    vector <string> m5 = {b5_0, b5_1, b5_2, b5_3, b5_4};
    string b3_0 = "aab";
    string b3_1 = "c.b";
    string b3_2 = "cdd";
    vector <string> m3 = {b3_0, b3_1, b3_2};
    if (n==3){
        cout << b3_0 << endl;
        cout << b3_1 << endl;
        cout << b3_2 << endl;
        return 0;
    }
    if (n==6){
        cout << "..." << b3_0 << endl;
        cout << "..." << b3_1 << endl;
        cout << "..." << b3_2 << endl;
        cout << b3_0 << "..." << endl;
        cout << b3_1 << "..." << endl;
        cout << b3_2 << "..." << endl;
        return 0;
    }

    REP(i, bunkai(n)){
        string pad_first;
        REP(_, i*4){
            pad_first += '.';
        }
        string pad_last;
        REP(_, n-i*4-4){
            pad_last += '.';
        }
        REP(j, 4){
            cout << pad_first << m4[j] << pad_last << endl;
        }
    }
    dump(bunkai(n))
    REP(i, (n - bunkai(n)*4)/5){
        string pad_first;
        REP(_, bunkai(n)*4 + i*5){
            pad_first += '.';
        }
        string pad_last;
        REP(_, n - bunkai(n)*4 - i*5 - 5){
            pad_last += '.';
        }
        REP(j, 5){
            cout << pad_first << m5[j] << pad_last << endl;
        }
    }

    return 0;
}

Measured memory_bytes: 1280