N = gets.chomp.to_i
a = Array.new(N){Array.new(N,0)}
if N == 2
    puts -1
    exit
end
if N == 3
    puts "aa."
    puts "..a"
    puts "..a"
    exit
end

i = 0
if N%4 == 1
    a[0][0] = 1
    a[0][1] = 2
    a[0][2] = 2
    a[0][3] = 3
    a[0][4] = 3
    a[1][0] = 1
    a[1][1] = 0
    a[1][2] = 0
    a[1][3] = 2
    a[1][4] = 4
    a[2][0] = 2
    a[2][1] = 0
    a[2][2] = 0
    a[2][3] = 2
    a[2][4] = 4
    a[3][0] = 2
    a[3][1] = 5
    a[3][2] = 5
    a[3][3] = 0
    a[3][4] = 1
    a[4][0] = 3
    a[4][1] = 3
    a[4][2] = 4
    a[4][3] = 4
    a[4][4] = 1
    i = 5
elsif N%4 == 2
    a[0][0] = 1
    a[0][1] = 1
    a[0][2] = 2
    a[0][3] = 2
    a[0][4] = 3
    a[0][5] = 3
    a[1][0] = 2
    a[1][1] = 2
    a[1][2] = 3
    a[1][3] = 3
    a[1][4] = 1
    a[1][5] = 1
    a[2][0] = 4
    a[2][1] = 5
    a[2][2] = 6
    a[3][0] = 4
    a[3][1] = 5
    a[3][2] = 6
    a[4][3] = 4
    a[4][4] = 5
    a[4][5] = 6
    a[5][3] = 4
    a[5][4] = 5
    a[5][5] = 6
    i = 6
elsif N%4 == 3
    a[0][1] = 1
    a[0][2] = 1
    a[0][3] = 2
    a[0][4] = 2
    a[0][5] = 3
    a[0][6] = 3
    a[1][0] = 1
    a[1][1] = 4
    a[1][2] = 4
    a[1][3] = 5
    a[2][0] = 1
    a[2][1] = 5
    a[2][2] = 0
    a[2][3] = 5
    a[3][0] = 2
    a[3][1] = 5
    a[3][2] = 4
    a[3][3] = 4
    a[4][0] = 2
    a[4][4] = 4
    a[4][5] = 4
    a[4][6] = 5
    a[5][0] = 3
    a[5][4] = 5
    a[5][5] = 0
    a[5][6] = 5
    a[6][0] = 3
    a[6][4] = 5
    a[6][5] = 4
    a[6][6] = 4
    i = 7
end
while i < N
    a[i][i] = 1
    a[i][i+1] = 1
    a[i][i+2] = 3
    a[i][i+3] = 4
    a[i+1][i] = 2
    a[i+1][i+1] = 2
    a[i+1][i+2] = 3
    a[i+1][i+3] = 4
    a[i+2][i] = 3
    a[i+2][i+1] = 4
    a[i+2][i+2] = 1
    a[i+2][i+3] = 1
    a[i+3][i] = 3
    a[i+3][i+1] = 4
    a[i+3][i+2] = 2
    a[i+3][i+3] = 2
    i += 4
end
for x in 0...N do
    for y in 0...N do
        b = a[x][y]
        if b == 0
            print "."
        elsif b == 1
            print "a"
        elsif b == 2
            print "b"
        elsif b == 3
            print "c"
        elsif b == 4
            print "d"
        elsif b == 5
            print "e"
        elsif b == 6
            print "f"
        end
    end
    puts
end