using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Linq;

using E = System.Linq.Enumerable;

internal partial class Solver {
    public void Run() {
        var n = ni();
        char[,] ans = Solve(n);
        if (ans == null) cout.WriteLine("-1");
        else
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < n; j++) {
                    cout.Write(ans[i, j]);
                }
                cout.WriteLine();
            }
    }

    private char[,] Solve(int n) {
        if (n <= 2) return null;
        char[,] ans = new char[n, n];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                ans[i, j] = '.';
            }
        }
        var p3 = new string[] {
            "aa.",
            "..b",
            "..b",
        };

        var p4 = new string[] {
            "aacd",
            "bbcd",
            "cdaa",
            "cdbb",
        };

        var p5 = new string[] {
            "aabbc",
            "ixx.c",
            "i..yd",
            "g..yd",
            "gffee",
        };

        var p6 = new string[] {
            "aa.ccd",
            "..bf.d",
            "..bfee",
            "ccdaa.",
            "f.d..b",
            "fee..b",
        };

        if (n == 7) {
            var rs = new int[n];
            var cs = new int[n];

            if (Dfs(n, ans, 0, 0, rs, cs)) {
                return ans;
            }
        }

        if (n % 3 == 0) {
            for (int i = 0; i < n; i += 3) {
                for (int j = 0; j < 3; j++) {
                    for (int k = 0; k < 3; k++) {
                        ans[i + j, i + k] = p3[j][k];
                    }
                }
            }
            return ans;
        } else {
            for (int n4 = 0; n4 * 4 <= n; n4++) {
                for (int n5 = 0; n4 * 4 + n5 * 5 <= n; n5++) {
                    var rem = n - (n4 * 4 + n5 * 5);
                    if (rem % 6 == 0) {
                        var n6 = rem / 6;
                        int current = 0;
                        while (n4 + n5 + n6 > 0) {
                            if (n4 > 0) {
                                for (int i = 0; i < p4.Length; i++) {
                                    for (int j = 0; j < p4.Length; j++) {
                                        ans[current + i, current + j] = p4[i][j];
                                    }
                                }
                                current += 4;
                                n4--;
                            } else if (n5 > 0) {
                                for (int i = 0; i < p5.Length; i++) {
                                    for (int j = 0; j < p5.Length; j++) {
                                        ans[current + i, current + j] = p5[i][j];
                                    }
                                }
                                current += 5;
                                n5--;
                            } else {
                                for (int i = 0; i < p6.Length; i++) {
                                    for (int j = 0; j < p6.Length; j++) {
                                        ans[current + i, current + j] = p6[i][j];
                                    }
                                }
                                current += 6;
                                n6--;
                            }
                        }


                        return ans;
                    }
                }
            }
        }

        return null;
    }

    bool Dfs(int n, char[,] ans, int row, int col, int[] rs, int[] cs, int placed = 0) {
        if (row > 0 && rs[row - 1] != 3) return false;

        if (row == n) {
            for (int i = 0; i < n; i++) {
                if (rs[i] != 3 || cs[i] != 3) return false;
            }
            return true;
        }

        int nrow = row;
        int ncol = col + 1;
        if (ncol == n) {
            nrow++;
            ncol = 0;
        }
        if (row + 1 < n
            && ans[row, col] == '.'
            && ans[row + 1, col] == '.'
            && rs[row] < 3 && rs[col] < 3 && cs[col] < 3) {
            rs[row]++;
            rs[row + 1]++;
            cs[col]++;

            ans[row, col] = ans[row + 1, col] = (char)('a' + placed);
            if (Dfs(n, ans, nrow, ncol, rs, cs, placed + 1)) {
                return true;
            }
            ans[row, col] = ans[row + 1, col] = '.';

            rs[row]--;
            rs[row + 1]--;
            cs[col]--;
        }

        if (col + 1 < n
            && ans[row, col] == '.'
            && ans[row, col + 1] == '.'
            && cs[col] < 3 && cs[col + 1] < 3 && rs[row] < 3) {
            rs[row]++;
            cs[col]++;
            cs[col + 1]++;

            ans[row, col] = ans[row, col + 1] = (char)('a' + placed);
            if (Dfs(n, ans, nrow, ncol, rs, cs, placed + 1)) {
                return true;
            }
            ans[row, col] = ans[row, col + 1] = '.';

            rs[row]--;
            cs[col]--;
            cs[col + 1]--;
        }

        if (Dfs(n, ans, nrow, ncol, rs, cs, placed)) { // no place
            return true;
        }
        return false;
    }
}

// PREWRITEN CODE BEGINS FROM HERE
internal partial class Solver : Scanner {
    public static void Main(string[] args) {
#if LOCAL
        byte[] inputBuffer = new byte[1000000];
        var inputStream = Console.OpenStandardInput(inputBuffer.Length);
        using (var reader = new StreamReader(inputStream, Console.InputEncoding, false, inputBuffer.Length)) {
            Console.SetIn(reader);
            new Solver(Console.In, Console.Out).Run();
        }
#else
        Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
        new Solver(Console.In, Console.Out).Run();
        Console.Out.Flush();
#endif
    }

#pragma warning disable IDE0052
    private readonly TextReader cin;
    private readonly TextWriter cout;
#pragma warning restore IDE0052

    public Solver(TextReader reader, TextWriter writer)
        : base(reader) {
        cin = reader;
        cout = writer;
    }
    public Solver(string input, TextWriter writer)
        : this(new StringReader(input), writer) {
    }

#pragma warning disable IDE1006
#pragma warning disable IDE0051
    private int ni() { return NextInt(); }
    private int[] ni(int n) { return NextIntArray(n); }
    private long nl() { return NextLong(); }
    private long[] nl(int n) { return NextLongArray(n); }
    private double nd() { return NextDouble(); }
    private double[] nd(int n) { return NextDoubleArray(n); }
    private string ns() { return Next(); }
    private string[] ns(int n) { return NextArray(n); }
#pragma warning restore IDE1006
#pragma warning restore IDE0051
}

internal static class LinqPadExtension {
    public static T Dump<T>(this T obj) {
#if LOCAL
        return LINQPad.Extensions.Dump(obj);
#else
        return obj;
#endif
    }
}

public class Scanner {
    private readonly TextReader Reader;
    private readonly Queue<string> TokenQueue = new Queue<string>();
    private readonly CultureInfo ci = CultureInfo.InvariantCulture;

    public Scanner()
        : this(Console.In) {
    }

    public Scanner(TextReader reader) {
        Reader = reader;
    }

    public int NextInt() { return int.Parse(Next(), ci); }
    public long NextLong() { return long.Parse(Next(), ci); }
    public double NextDouble() { return double.Parse(Next(), ci); }
    public string[] NextArray(int size) {
        string[] array = new string[size];
        for (int i = 0; i < size; i++) {
            array[i] = Next();
        }

        return array;
    }
    public int[] NextIntArray(int size) {
        int[] array = new int[size];
        for (int i = 0; i < size; i++) {
            array[i] = NextInt();
        }

        return array;
    }

    public long[] NextLongArray(int size) {
        long[] array = new long[size];
        for (int i = 0; i < size; i++) {
            array[i] = NextLong();
        }

        return array;
    }

    public double[] NextDoubleArray(int size) {
        double[] array = new double[size];
        for (int i = 0; i < size; i++) {
            array[i] = NextDouble();
        }

        return array;
    }

    public string Next() {
        if (TokenQueue.Count == 0) {
            if (!StockTokens()) {
                throw new InvalidOperationException();
            }
        }
        return TokenQueue.Dequeue();
    }

    public bool HasNext() {
        if (TokenQueue.Count > 0) {
            return true;
        }

        return StockTokens();
    }

    private static readonly char[] _separator = new[] { ' ', '\t' };
    private bool StockTokens() {
        while (true) {
            string line = Reader.ReadLine();
            if (line == null) {
                return false;
            }

            string[] tokens = line.Split(_separator, StringSplitOptions.RemoveEmptyEntries);
            if (tokens.Length == 0) {
                continue;
            }

            foreach (string token in tokens) {
                TokenQueue.Enqueue(token);
            }

            return true;
        }
    }
}


Measured memory_bytes: 14072