N = int(input())

if N == 2:
    print(-1)
    exit()
if N == 3:
    print('aa.')
    print('..a')
    print('..a')
    exit()

def f(n,m):
    a = ''
    b = ''
    for i in range(n):
        if i == 2*m-2 or i == 2*m-1:
            a += 'a'
            b += 'b'
        elif i == n-2*m:
            a += 'a'
            b += 'a'
        elif i == n-2*m+1:
            a += 'b'
            b += 'b'
        else:
            a += '.'
            b += '.'
    print(a)
    print(b)

def g(n,m):
    a = ''
    b = ''
    for i in range(n):
        if i == 2*m-2:
            a += 'a'
            b += 'a'
        elif i == 2*m-1:
            a += 'b'
            b += 'b'
        elif i == n-2*m or i == n-2*m+1:
            a += 'a'
            b += 'b'
        else:
            a += '.'
            b += '.'
    print(a)
    print(b)

if N % 4 == 0:
    for i in range(N//4 - 1):
        f(N,i+1)
    a = ''
    b = ''
    c = ''
    d = ''
    for i in range(N):
        if i == (N//2) - 2:
            a += 'a'
            b += 'd'
            c += 'c'
            d += 'c'
        elif i == (N//2) - 1:
            a += 'a'
            b += 'd'
            c += 'b'
            d += 'b'
        elif i == N//2:
            a += 'b'
            b += 'b'
            c += 'a'
            d += 'd'
        elif i == (N//2) + 1:
            a += 'c'
            b += 'c'
            c += 'a'
            d += 'd'
        else:
            a += '.'
            b += '.'
            c += '.'
            d += '.'
    print(a)
    print(b)
    print(c)
    print(d)
    for i in range(N//4-1):
        g(N,(N//4)-i-1)

if N % 4 == 1:
    for i in range(N//4 - 1):
        f(N,i+1)
    a = ''
    b = ''
    c = ''
    d = ''
    e = ''
    for i in range(N):
        if i == (N//2) - 2:
            a += 'a'
            b += 'a'
            c += 'b'
            d += 'b'
            e += 'a'
        elif i == (N//2) - 1:
            a += 'b'
            b += 'c'
            c += '.'
            d += '.'
            e += 'a'
        elif i == N//2:
            a += 'b'
            b += 'c'
            c += '.'
            d += '.'
            e += 'b'
        elif i == (N//2) + 1:
            a += 'a'
            b += '.'
            c += 'a'
            d += 'a'
            e += 'b'
        elif i == (N//2) + 2:
            a += 'a'
            b += 'b'
            c += 'b'
            d += 'c'
            e += 'c'
        else:
            a += '.'
            b += '.'
            c += '.'
            d += '.'
            e += '.'
    print(a)
    print(b)
    print(c)
    print(d)
    print(e)
    for i in range(N//4-1):
        g(N,(N//4)-i-1)

if N % 4 == 2:
    for i in range(N//4 - 1):
        f(N,i+1)
    a = ''
    b = ''
    c = ''
    d = ''
    e = ''
    f = ''
    for i in range(N):
        if i == (N//2) - 3:
            a += 'a'
            b += 'a'
            c += 'b'
            d += 'b'
            e += 'a'
            f += 'a'
        elif i == (N//2) - 2:
            a += 'b'
            b += 'b'
            c += 'a'
            d += 'a'
            e += 'b'
            f += 'b'
        elif i == (N//2) - 1:
            a += 'a'
            b += '.'
            c += 'b'
            d += '.'
            e += 'a'
            f += '.'
        elif i == N//2:
            a += 'a'
            b += '.'
            c += 'b'
            d += '.'
            e += 'a'
            f += '.'
        elif i == (N//2) + 1:
            a += '.'
            b += 'b'
            c += '.'
            d += 'a'
            e += '.'
            f += 'b'
        elif i == (N//2) + 2:
            a += '.'
            b += 'b'
            c += '.'
            d += 'a'
            e += '.'
            f += 'b'
        else:
            a += '.'
            b += '.'
            c += '.'
            d += '.'
            e += '.'
            f += '.'
    print(a)
    print(b)
    print(c)
    print(d)
    print(e)
    print(f)
    for i in range(N//4-1):
        g(N,(N//4)-i-1)

if N % 4 == 3:
    for i in range(N//4 - 1):
        f(N,i+1)
    a = ''
    b = ''
    c = ''
    d = ''
    e = ''
    f = ''
    h = ''
    for i in range(N):
        if i == (N//2) - 3:
            a += 'a'
            b += 'b'
            c += 'a'
            d += '.'
            e += '.'
            f += '.'
            h += '.'
        elif i == (N//2) - 2:
            a += 'a'
            b += 'b'
            c += 'a'
            d += '.'
            e += '.'
            f += '.'
            h += '.'
        elif i == (N//2) - 1:
            a += 'b'
            b += 'a'
            c += 'b'
            d += '.'
            e += '.'
            f += '.'
            h += '.'
        elif i == N//2:
            a += 'b'
            b += 'a'
            c += 'b'
            d += '.'
            e += '.'
            f += '.'
            h += '.'
        elif i == (N//2) + 1:
            a += 'c'
            b += 'c'
            c += '.'
            d += 'b'
            e += 'b'
            f += 'a'
            h += 'a'
        elif i == (N//2) + 2:
            a += '.'
            b += '.'
            c += 'c'
            d += 'a'
            e += 'a'
            f += 'b'
            h += 'b'
        elif i == (N//2) + 3:
            a += '.'
            b += '.'
            c += 'c'
            d += 'b'
            e += 'b'
            f += 'a'
            h += 'a'
        else:
            a += '.'
            b += '.'
            c += '.'
            d += '.'
            e += '.'
            f += '.'
            h += '.'
    print(a)
    print(b)
    print(c)
    print(d)
    print(e)
    print(f)
    print(h)
    for i in range(N//4-1):
        g(N,(N//4)-i-1)

Measured memory_bytes: 49116