import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.stdio;

void main() {
    int N = readln.chomp.to!int;

    if (N == 2) {
        writeln(-1);
        return;
    }

    if (N == 3) {
        writeln("aab");
        writeln("c.b");
        writeln("cdd");
        return;
    }

    int top = N.bsr;
    int M;
    dchar[][] A;

    auto A5 = new dchar[][](5, 5);
    A5[0] = ['a', 'a', 'b', 'b', 'd'];
    A5[1] = ['i', 'j', 'j', '.', 'd'];
    A5[2] = ['i', '.', '.', 'k', 'e'];
    A5[3] = ['h', '.', '.', 'k', 'e'];
    A5[4] = ['h', 'g', 'g', 'f', 'f'];

    auto A4 = new dchar[][](4, 4);
    A4[0] = ['a', 'a', '.', 'e'];
    A4[1] = ['b', '.', '.', 'e'];
    A4[2] = ['b', '.', 'd', 'd'];
    A4[3] = ['.', 'c', 'c', '.'];


    void mul() {
        int n = A.length.to!int;
        foreach (i; 0..n) foreach (j; 0..n) A[i] ~= '.';
        foreach (i; 0..n) {
            A ~= new dchar[](n);
            foreach (j; 0..n) A[i+n][j] = '.';
            A[i+n] ~= A[i][0..n].dup;
        }
    }

    dchar[][] add(const dchar[][] X, const dchar[][] Y) {
        int n = X.length.to!int;
        int m = Y.length.to!int;
        dchar[][] Z = new dchar[][](n+m, n+m);
        foreach (i; 0..n+m) foreach (j; 0..n+m) {
            if (i < n && j < n) Z[i][j] = X[i][j];
            else if (i >= n && j >= n) Z[i][j] = Y[i-n][j-n];
            else Z[i][j] = '.';
        }
        return Z;
    }

    for (int i = 0; i <= N; i += 4) {
        if ((N - i) % 5 == 0) {
            dchar[][] ans;
            foreach (_; 0..i) ans = add(ans, A4);
            foreach (_; 0..(N-i)/5) ans = add(ans, A5);
            foreach (r; 0..N) {
                foreach (c; 0..N) write(ans[r][c]);
                writeln;
            }
            return;
        }
    }

    for (int i = 0; i <= N; i += 5) {
        if ((N - i) % 4 == 0) {
            dchar[][] ans;
            foreach (_; 0..i) ans = add(ans, A5);
            foreach (_; 0..(N-i)/4) ans = add(ans, A4);
            foreach (r; 0..N) {
                foreach (c; 0..N) write(ans[r][c]);
                writeln;
            }
            return;
        }
    }

    writeln(-1);
}
