using System;
using System.Linq;

public class Program
{
    private int N;

    public void Solve()
    {
        var sc = new Scanner();
        N = sc.NextInt();
/*
 * 3*3
 * aab
 * c.b
 * cdd
 *
 * 4*4 3
 * abcc 
 * abdd
 * eegh
 * ffgh 
 *
 * 5*5 3
 * aabbc
 * de..c
 * de..f
 * g.hhf
 * giijj
 *
 * 6*6 3
 * aabbcc
 * d.e.f.
 * d.e.f.
 * .g.h.i
 * .g.h.i
 * jjkkll
 *
 * 7*7 3
 * aabbcc.
 * de....f
 * de....f
 * gh....i
 * gh....i
 * ..jjkkl
 * ..mmnnl
 */

        string[] four = new string[4]
        {
            "abcc",
            "abdd",
            "eegh",
            "ffgh"
        };

        string[] five = new string[5]
        {
            "aabbc",
            "de..c",
            "de..f",
            "g.hhf",
            "giijj"
        };

        string[] six = new string[6]
        {
            "aabbcc",
            "d.e.f.",
            "d.e.f.",
            ".g.h.i",
            ".g.h.i",
            "jjkkll"
        };

        string[] seven = new string[7]
        {
            "aabbcc.",
            "de....f",
            "de....f",
            "gh....i",
            "gh....i",
            "..jjkkl",
            "..mmnnl"
        };

        if (N == 2)
        {
            Console.WriteLine(-1);
            return;
        }

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

        int d = N / 4;
        int m = N % 4;

        char[][] ans = new char[N][];
        for (int i = 0; i < N; i++)
        {
            ans[i] = new char[N];
            for (int j = 0; j < N; j++)
            {
                ans[i][j] = '.';
            }
        }

        // d-1個 4*4
        // 最後 4+mのやつ

        for (int i = 0; i < d - 1; i++)
        {
            int ii = i * 4;
            for (int j = 0; j < 4; j++)
            {
                for (int k = 0; k < 4; k++)
                {
                    ans[ii + j][ii + k] = four[j][k];
                }
            }
        }

        int iii = 4 * (d - 1);
        int type = 4 + m;
        if (type == 4)
        {
            for (int i = 0; i < 4; i++)
            {
                for (int j = 0; j < 4; j++)
                {
                    ans[iii + i][iii + j] = four[i][j];
                }
            }
        }
        else if (type == 5)
        {
            for (int i = 0; i < 5; i++)
            {
                for (int j = 0; j < 5; j++)
                {
                    ans[iii + i][iii + j] = five[i][j];
                }
            }
        }
        else if (type == 6)
        {
            for (int i = 0; i < 6; i++)
            {
                for (int j = 0; j < 6; j++)
                {
                    ans[iii + i][iii + j] = six[i][j];
                }
            }
        }
        else if (type == 7)
        {
            for (int i = 0; i < 7; i++)
            {
                for (int j = 0; j < 7; j++)
                {
                    ans[iii + i][iii + j] = seven[i][j];
                }
            }
        }

        Console.WriteLine(string.Join("\n", ans.Select(c => new string(c))));
    }

    public static void Main(string[] args)
    {
        new Program().Solve();
    }
}

class Scanner
{
    public Scanner()
    {
        _pos = 0;
        _line = new string[0];
    }

    const char Separator = ' ';
    private int _pos;
    private string[] _line;

    #region スペース区切りで取得

    public string Next()
    {
        if (_pos >= _line.Length)
        {
            _line = Console.ReadLine().Split(Separator);
            _pos = 0;
        }

        return _line[_pos++];
    }

    public int NextInt()
    {
        return int.Parse(Next());
    }

    public long NextLong()
    {
        return long.Parse(Next());
    }

    public double NextDouble()
    {
        return double.Parse(Next());
    }

    #endregion

    #region 型変換

    private int[] ToIntArray(string[] array)
    {
        var result = new int[array.Length];
        for (int i = 0; i < array.Length; i++)
        {
            result[i] = int.Parse(array[i]);
        }

        return result;
    }

    private long[] ToLongArray(string[] array)
    {
        var result = new long[array.Length];
        for (int i = 0; i < array.Length; i++)
        {
            result[i] = long.Parse(array[i]);
        }

        return result;
    }

    private double[] ToDoubleArray(string[] array)
    {
        var result = new double[array.Length];
        for (int i = 0; i < array.Length; i++)
        {
            result[i] = double.Parse(array[i]);
        }

        return result;
    }

    #endregion

    #region 配列取得

    public string[] Array()
    {
        if (_pos >= _line.Length)
            _line = Console.ReadLine().Split(Separator);

        _pos = _line.Length;
        return _line;
    }

    public int[] IntArray()
    {
        return ToIntArray(Array());
    }

    public long[] LongArray()
    {
        return ToLongArray(Array());
    }

    public double[] DoubleArray()
    {
        return ToDoubleArray(Array());
    }

    #endregion
}

Measured memory_bytes: 19936