#define _USE_MATH_DEFINES
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <cstdio>
#include <complex>
#include <numeric>
#include <string.h>
#include <random>
#include <cmath>
#define rep(i,n) for (int i = 0; i < (int)n; i++)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pi;
typedef pair<pi, pi> pp;
typedef pair<ll, ll> pl;
double PI = 3.141592653589793238462643383279;
const double EPS = 1e-9;
const ll MOD = 1000000007;
//const ll MOD = 998244353
const int inf = 1 << 30;
const ll linf = 1LL << 60;

int n;
char out[1000][1000];

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> n;
    if (n == 2) {
        cout << -1 << endl;
        return 0;
    }
    if (n == 3) {
        cout << "a.." << endl;
        cout << "a.." << endl;
        cout << ".aa" << endl;
        return 0;
    }
    if (n == 6) {
        cout << "a....." << endl;
        cout << "a....." << endl;
        cout << ".aa..." << endl;
        cout << "...a.." << endl;
        cout << "...a.." << endl;
        cout << "....aa" << endl;
        return 0;
    }
    if (n == 7) {
        cout << "n...cce" << endl;
        cout << "n.ii..e" << endl;
        cout << ".hb..dd" << endl;
        cout << ".hbff.." << endl;
        cout << "laa.m.." << endl;
        cout << "l..jm.." << endl;
        cout << "gg.j.kk" << endl;
        return 0;
    }
    if (n == 11) {
        cout << "n...cce...." << endl;
        cout << "n.ii..e...." << endl;
        cout << ".hb..dd...." << endl;
        cout << ".hbff......" << endl;
        cout << "laa.m......" << endl;
        cout << "l..jm......" << endl;
        cout << "gg.j.kk...." << endl;
        cout << ".......aacd" << endl;
        cout << ".......bbcd" << endl;
        cout << ".......efgg" << endl;
        cout << ".......efhh" << endl;
        return 0;
    }
    rep(i,n) rep(j,n) out[i][j] = '.';
    for (int x = 0; x <= n; x += 4) {
        int y = n-x;
        if (y%5) continue;
        for (int i = 0; i < x; i += 4) {
            int j = i;
            out[i][j] = 'a'; out[i][j+1] = 'a'; out[i][j+2] = 'c'; out[i][j+3] = 'd';
            out[i+1][j] = 'b'; out[i+1][j+1] = 'b'; out[i+1][j+2] = 'c'; out[i+1][j+3] = 'd';
            out[i+2][j] = 'e'; out[i+2][j+1] = 'f'; out[i+2][j+2] = 'g'; out[i+2][j+3] = 'g';
            out[i+3][j] = 'e'; out[i+3][j+1] = 'f'; out[i+3][j+2] = 'h'; out[i+3][j+3] = 'h';
        }
        for (int i = x; i < n; i += 5) {
            int j = i;
            out[i  ][j] = 'a'; out[i  ][j+1] = 'a'; out[i  ][j+2] = 'b'; out[i  ][j+3] = 'e'; out[i  ][j+4] = 'e';
            out[i+1][j] = 'd'; out[i+1][j+1] = '.'; out[i+1][j+2] = 'b'; out[i+1][j+3] = 'f'; out[i+1][j+4] = 'f';
            out[i+2][j] = 'd'; out[i+2][j+1] = 'c'; out[i+2][j+2] = 'c'; out[i+2][j+3] = 'g'; out[i+2][j+4] = 'g';
            out[i+3][j] = 'e'; out[i+3][j+1] = 'f'; out[i+3][j+2] = 'g'; out[i+3][j+3] = '.'; out[i+3][j+4] = '.';
            out[i+4][j] = 'e'; out[i+4][j+1] = 'f'; out[i+4][j+2] = 'g'; out[i+4][j+3] = '.'; out[i+4][j+4] = '.';
        }
        break;
    }
    rep(i,n) {
        rep(j,n){
            cout << out[i][j];
        }
        cout << endl;
    }
}

Measured memory_bytes: 2176