#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#include <list>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
//#define cerr if(false) cerr
#ifdef DEBUG
#define show(...) cerr << #__VA_ARGS__ << " = ", debug(__VA_ARGS__);
#else
#define show(...) 42
#endif
using namespace std;
using ll = long long;
using pii = pair<int, int>;
template <typename T, typename S>
ostream& operator<<(ostream& os, pair<T, S> a) {
    os << '(' << a.first << ',' << a.second << ')';
    return os;
}
template <typename T>
ostream& operator<<(ostream& os, vector<T> v) {
    for (auto x : v) os << x << ' ';
    return os;
}
void debug() {
    cerr << '\n';
}
template <typename H, typename... T>
void debug(H a, T... b) {
    cerr << a;
    if (sizeof...(b)) cerr << ", ";
    debug(b...);
}
const int n = 7;
int tate[10];
int yoko[10];
char a[10][10];
void dfs(int cnt, int k){
    int i = k / n;
    int j = k % n;
    if(i == n and j == 0){
        rep(l,n)if(tate[l] != 3 or yoko[l] != 3)return;
        rep(l,n){
            rep(m,n){
                cout << a[l][m];
            }
            cout << endl;
        }
        exit(0);
    }
    if(i + 1 < n and a[i][j] == a[i+1][j] and a[i][j] == '.'){
        a[i][j] = a[i+1][j] = 'a' + cnt;
        yoko[i]++;
        yoko[i+1]++;
        tate[j]++;
        if(yoko[i] <= 3 and yoko[i+1]<=3 and tate[j] <= 3)dfs(cnt+1,k+1);
        a[i][j] = a[i+1][j] = '.';
        yoko[i]--;
        yoko[i+1]--;
        tate[j]--;
    }
    if(j + 1 < n and a[i][j] == a[i][j+1] and a[i][j] == '.'){
        a[i][j] = a[i][j+1] = 'a' + cnt;
        yoko[i]++;
        tate[j]++;
        tate[j+1]++;
        if(yoko[i] <= 3 and tate[j]<=3 and tate[j+1] <= 3)dfs(cnt+1,k+1);
        a[i][j] = a[i][j+1] = '.';
        yoko[i]--;
        tate[j]--;
        tate[j+1]--;
    }
    dfs(cnt,k+1);
}
//int main(){
//    rep(i,n)rep(j,n)a[i][j] = '.';
//    dfs(0,0);
//}
int main(){
    int n;
    cin >> n;
    if(n == 2){
        cout << -1 << endl;
        return 0;
    }
    if(n == 3){
        cout << "aa." << endl;
        cout << "..a" << endl;
        cout << "..a" << endl;
        return 0;
    }
    string four[4] = {
        "aabc",
        "ddbc",
        "cbaa",
        "cbdd"
    };
    string five[5] = {
        "accbb",
        "aff.c",
        "b..fc",
        "b..fd",
        "cceed",
    };
    string six[6] = {
        "abc...",
        "abc...",
        "d.eeff",
        "dghh..",
        ".g.ijj",
        "kk.ill"
    };
    string seven[7] = {
        "abc....",
        "abc....",
        "def....",
        "def....",
        "g..hhii",
        "g..jjkk",
        ".llmmnn"
    };
    vector<string> res(n);
    rep(i,n)res[i] = string(n,'.');
    if(n % 4 == 0){
        for(int i = 0; i < n; i += 4){
            rep(j,4)rep(k,4){
                res[i + j][i + k] = four[j][k];
            }
        }
    }else if(n % 4 == 2){
        for(int i = 0; i < n - 4; i += 4){
            rep(j,4)rep(k,4){
                res[i + j][i + k] = four[j][k];
            }
        }
        //6
        const int sz = n % 4 + 4;
        rep(j,sz)rep(k,sz){
            res[n - sz + j][n - sz + k] = six[j][k];
        }
    }else if(n % 4 == 3){
        for(int i = 0; i < n - 4; i += 4){
            rep(j,4)rep(k,4){
                res[i + j][i + k] = four[j][k];
            }
        }
        //7
        const int sz = n % 4 + 4;
        rep(j,sz)rep(k,sz){
            res[n - sz + j][n - sz + k] = seven[j][k];
        }
    }else if(n % 4 == 1){
        for(int i = 0; i < n - 4; i +=4){
            rep(j,4)rep(k,4){
                res[i + j][i + k] = four[j][k];
            }
        }
        //5
        const int sz = n % 4 + 4;
        rep(j,sz)rep(k,sz){
            res[n - sz + j][n - sz + k] = five[j][k];
        }
    }else{
        assert(false);
    }
    rep(i,n)cout << res[i] << endl;
    return 0;
}


Measured memory_bytes: 2304