#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

#define F first
#define S second
#define int long long
#define ll long long
//#define int  unsigned long long
#define pb push_back
//#define double long double

using namespace std;
using namespace __gnu_pbds;
typedef  tree< int , null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
const int mod = 1e9 + 7;
const int N = 25;
const int K = 50;
int a[N][N], b[N], c[N];
char res[10][25][25];
char ans[2500][2005];
void gen(int n, int m){
    srand(time(NULL));
    for (int i = 1; i <= n || i > n; i++){
        for (int j = 0; j < m; j++){
            for (int l = 0; l < m; l++){
                a[j][l] = 0;
                b[j] = 0;
                c[l] = 0;
            }
        }
        int cnt = 1;
        int t = 0;
        int f = 0;
        int k = 0;
        for (int j = 0; j < n && k < m; j++){
            int x = rand() % m;
            int y = rand() % m;
            t++;
            if (t > 1000){
                f = 1;
                break;
            }
            if (a[x][y] != 0 || a[x + 1][y] != 0 || x == m - 1) continue;
            a[x][y] = cnt;
            a[x + 1][y] = cnt;
            cnt++;
            b[x]++;
            b[x + 1]++;
            c[y]++;
            k++;
        }
        k = 0;
        for (int j = 0; j < n && k < m; j++){
            int x = rand() % m;
            int y = rand() % m;
            t++;
            if (t > 1000){
                f = 1;
                break;
            }
            if (a[x][y] != 0 || a[x][y + 1] != 0 || y == m - 1) continue;
            a[x][y] = cnt;
            a[x][y + 1] = cnt;
            cnt++;
            b[x]++;
            c[y]++;
            c[y + 1]++;
            k++;
        }
        for (int j = 0; j < m; j++){
            if (b[j] != 3 || c[j] != 3) f = 1;
        }
        if (!f){
            for (int i = 0; i < m; i++){
                for (int j = 0; j < m; j++){
                    res[m][i][j] = ('a' + a[i][j]);
                }
            }
            return;
        }
    }
}
main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    //freopen("input.txt", "r", stdin);
    int n;
    cin >> n;
    int nn = n;
    if (n == 3){
        cout << "aa." << endl;
        cout << "..b" << endl;
        cout << "..b" << endl;
        return 0;
    }
    if (n == 2){
        cout << -1;
        return 0;
    }
    gen(100000, 4);
    gen(100000, 7);
    gen(100000, 6);
    gen(100000, 5);
    for (int i = 0; i < n; i++){
        for (int j = 0; j < n; j++){
            ans[i][j] = '.';
        }
    }
    int r = 0;
    while(n >= 8){
        for (int i = r; i < r + 4; i++){
            for (int j = r; j < r + 4; j++){
                ans[i][j] = res[4][i - r][j - r];
            }
        }
        n -= 4;
        r += 4;
    }
    for (int i = r; i < r + n; i++){
        for (int j = r; j < r + n; j++){
            ans[i][j] = res[n][i - r][j - r];
        }
    }
   for (int i = 0; i < nn; i++){
        for (int j = 0; j < nn; j++){
            if (ans[i][j] == 'a') cout << "."; else
            cout << ans[i][j];
        }
        cout << endl;
    }
}


Measured memory_bytes: 3200