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;

    if ((N >> (top - 1)) & 1) {
        M = 6;
        A = new dchar[][](6, 6);
        A[0] = ['a', 'a', 'b', 'b', '.', '.'];
        A[1] = ['b', '.', '.', 'z', 'z', '.'];
        A[2] = ['b', 'a', '.', '.', '.', '.'];
        A[3] = ['.', 'a', '.', '.', 'a', 'a'];
        A[4] = ['.', '.', 'a', '.', '.', 'b'];
        A[5] = ['.', '.', 'a', '.', '.', 'b'];
    } else {
        M = 4;
        A = new dchar[][](4, 4);
        A[0] = ['a', 'a', '.', 'e'];
        A[1] = ['b', '.', '.', 'e'];
        A[2] = ['b', '.', 'd', 'd'];
        A[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;
        }
    }

    void add() {
        int n = A.length.to!int;
        dchar c = 'a';
        foreach (i; iota(0, n, 2)) {
            while (c == A[i].back || c == A[i+1].back) {
                c += 1;
                if (c > 'z') c = 'a';
            }
            A[i] ~= c;
            A[i+1] ~= c;
            c += 1;
            if (c > 'z') c = 'a';
        }
        A ~= new dchar[](n + 1);
        c = 'a';
        foreach (j; iota(0, n, 2)) {
            while (c == A.back[j] || c == A.back[j+1]) {
                c += 1;
                if (c > 'z') c = 'a';
            }
            A.back[j] = c;
            A.back[j+1] = c;
            c += 1;
            if (c > 'z') c = 'a';
        }
        A.back.back = '.';
    }

    foreach_reverse (b; 0..top-1) {
        if ((N >> b) & 1) {
            add;
        }
        if (b > 0) mul;
    }

    foreach (a; A) {
        foreach (b; a) write(b);
        writeln;
    }
}
