#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<vector>
#include<map>
#include<set>
#include<string>
#include<queue>
#include<stack>
using namespace std;
#define MOD 1000000007
#define INF (1<<29)
#define LINF (1LL<<60)
#define EPS (1e-10)
typedef long long Int;
typedef pair<Int, Int> P;

char field[5500][5500];
int n;

void put3(int x, int y){
    field[x][y] = 'a';
    field[x][y+1] = 'a';
    field[x+1][y+2] = 'b';
    field[x+2][y+2] = 'b';
}
void put32(int x, int y){
    field[x][y] = 'c';
    field[x][y+1] = 'c';
    field[x][y+2] = 'd';
    field[x+1][y+2] = 'd';
    field[x+2][y+2] = 'e';
    field[x+2][y+1] = 'e';
    field[x+2][y] = 'f';
    field[x+1][y] = 'f';
}

void row(int x, int y, char a, char b){
    field[x][y] = a;
    field[x][y+1] = a;
    field[x+1][y] = b;
    field[x+1][y+1] = b;
}

void col(int x, int y, char a, char b){
    field[x][y] = a;
    field[x+1][y] = a;
    field[x][y+1] = b;
    field[x+1][y+1] = b;
}


void put42(int x, int y){
    field[x][y] = 'a';
    field[x][y+1] = 'a';
    field[x+1][y+2] = 'b';
    field[x+2][y+2] = 'b';
    field[x][y+3] = 'c';
    field[x+1][y+3] = 'c';
    field[x+2][y] = 'd';
    field[x+3][y] = 'd';
    field[x+3][y+2] = 'e';
    field[x+3][y+3] = 'e';
}

void put4(int x, int y){
    row(x,y,'a', 'b');
    row(x+2,y+2,'c','d');
    col(x+2,y,'e','f');
    col(x,y+2,'g','h');
}

void put5(int x, int y){
    put3(x + 1, y + 1);
    field[x][y] = 'c';
    field[x][y+1] = 'c';
    field[x][y+2] = 'd';
    field[x][y+3] = 'd';
    field[x][y+4] = 'e';
    field[x+1][y+4] = 'e';
    field[x+2][y+4] = 'f';
    field[x+3][y+4] = 'f';
    field[x+4][y+4] = 'g';
    field[x+4][y+3] = 'g';
    field[x+4][y+2] = 'h';
    field[x+4][y+1] = 'h';
    field[x+4][y] = 'i';
    field[x+3][y] = 'i';
    field[x+2][y] = 'j';
    field[x+1][y] = 'j';
}

void put11(int x, int y){
    put5(x,y);
    put3(x+5,y+5);
    put3(x+8,y+8);
    put32(x+5,y+8);
    put32(x+8,y+5);
}
void put7(int x, int y){
    put3(x+2, y+2);
    field[x][y] = 'c';
    field[x][y+1] = 'c';
    field[x+1][y+2] = 'd';
    field[x+1][y+3] = 'd';
    field[x][y+4] = 'e';
    field[x+1][y+4] = 'e';
    field[x][y+6] = 'f';
    field[x+1][y+6] = 'f';
    field[x+2][y+5] = 'g';
    field[x+3][y+5] = 'g';
    field[x+4][y+5] = 'h';
    field[x+4][y+6] = 'h';
    field[x+6][y+5] = 'i';
    field[x+6][y+6] = 'i';
    field[x+5][y+4] = 'j';
    field[x+5][y+3] = 'j';
    field[x+5][y+2] = 'k';
    field[x+6][y+2] = 'k';
    field[x+5][y] = 'l';
    field[x+6][y] = 'l';    
    field[x+3][y+1] = 'm';
    field[x+4][y+1] = 'm';
    field[x+2][y] = 'n';
    field[x+2][y+1] = 'n';
}

int main(){
    cin >> n;
    for(int i = 0;i < n;i++)
        for(int j = 0;j < n;j++)field[i][j] = '.';
    if(n == 2){
        cout << -1 << endl;
        return 0;
    }
    int start = 0;
    if(n % 3 == 0){
        for(int i = 0;i < n;i+=3)put3(i,i);
    }
    else{
        if(n % 4 == 0){
            for(int i = 0;i < n;i+=4)put4(i,i);
        }
        if(n % 4 == 1){
            put5(0,0);
            for(int i = 5;i < n;i+=4)put4(i,i);
        }
        if(n % 4 == 2){
            put5(0,0);
            put5(5,5);
            for(int i = 10;i < n;i+=4)put4(i,i);
        }
        if(n % 4 == 3){
            put7(0,0);
            for(int i = 7;i < n;i +=4)put4(i,i);
        }
    }
    for(int i = 0;i < n;i++){
        for(int j = 0;j < n;j++){
            printf("%c", field[i][j]);
        }
        printf("\n");
    }
    return 0;
}

Measured memory_bytes: 7168