#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vb = vector<bool>;
using vd = vector<double>;
using vs = vector<string>;

typedef tree<
ll,
null_type,
less<ll>,
rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
// ordered_set X;
// *X.find_by_order(i) = ith largest element (counting from zero)
// X.order_of_key(k) = number of items in X < k (strict lt)


int main(){
    int N;

    cin >> N;

    if (N == 2) {
        cout << -1 << endl;
        return 0;
    } else if (N==3){
        cout << "aab\nc.b\ncdd\n";
        return 0;
    }

    vector<char> gridrow(N, '.');
    vector<vector<char>> grid(N, gridrow);

    int st = 0;
    if (N%4 == 0) {
        grid[0][0] = 'a';
        grid[0][1] = 'a';
        grid[1][0] = 'b';
        grid[1][1] = 'b';
        grid[2][2] = 'c';
        grid[2][3] = 'c';
        grid[3][2] = 'd';
        grid[3][3] = 'd';

        grid[0][2] = 'e';
        grid[1][2] = 'e';

        grid[0][3] = 'f';
        grid[1][3] = 'f';

        grid[2][0] = 'g';
        grid[3][0] = 'g';
        
        grid[2][1] = 'h';
        grid[3][1] = 'h';
        st = 4;
    } else if (N%4 == 1) {
        grid[0][0] = 'a';
        grid[1][0] = 'a';

        grid[1][1] = 'b';
        grid[2][1] = 'b';
        grid[0][2] = 'c';
        grid[1][2] = 'c';
        grid[2][2] = 'd';
        grid[3][2] = 'd';
        grid[0][3] = 'e';
        grid[0][4] = 'e';
        grid[2][3] = 'f';
        grid[2][4] = 'f';
        grid[3][0] = 'g';
        grid[3][1] = 'g';
        grid[4][0] = 'h';
        grid[4][1] = 'h';
        grid[4][2] = 'i';
        grid[4][3] = 'i';
        grid[3][4] = 'j';
        grid[4][4] = 'j';
        st = 5;
    } else if (N%4 == 2) {
        grid[0][2] = 'a';
        grid[0][3] = 'a';
        grid[0][4] = 'b';
        grid[0][5] = 'b';
        grid[1][4] = 'c';
        grid[1][5] = 'c';
        grid[2][0] = 'd';
        grid[2][1] = 'd';
        grid[3][1] = 'e';
        grid[3][2] = 'e';
        grid[5][3] = 'f';
        grid[5][4] = 'f';

        grid[0][0] = 'g';
        grid[1][0] = 'g';
        grid[1][2] = 'h';
        grid[2][2] = 'h';
        grid[2][3] = 'i';
        grid[3][3] = 'i';
        grid[3][5] = 'j';
        grid[4][5] = 'j';
        grid[4][0] = 'k';
        grid[5][0] = 'k';
        grid[4][1] = 'l';
        grid[5][1] = 'l';
        st = 6;
    } else if (N%4 == 3) {
        grid[0][1] = 'a';
        grid[0][2] = 'a';
        grid[0][5] = 'b';
        grid[0][6] = 'b';
        grid[1][5] = 'c';
        grid[1][6] = 'c';
        grid[3][5] = 'd';
        grid[3][6] = 'd';
        grid[4][0] = 'e';
        grid[4][1] = 'e';
        grid[4][3] = 'f';
        grid[4][4] = 'f';
        grid[6][2] = 'g';
        grid[6][3] = 'g';

        grid[0][3] = 'h';
        grid[1][3] = 'h';
        grid[1][4] = 'i';
        grid[2][4] = 'i';
        grid[2][0] = 'j';
        grid[3][0] = 'j';
        grid[2][1] = 'k';
        grid[3][1] = 'k';
        grid[4][2] = 'l';
        grid[5][2] = 'l';
        grid[5][0] = 'm';
        grid[6][0] = 'm';
        grid[5][4] = 'n';
        grid[6][4] = 'n';
        st = 7;
    }

    for (;st<N;st+=4) {
        grid[st+0][st+0] = 'a';
        grid[st+0][st+1] = 'a';
        grid[st+1][st+0] = 'b';
        grid[st+1][st+1] = 'b';
        grid[st+2][st+2] = 'c';
        grid[st+2][st+3] = 'c';
        grid[st+3][st+2] = 'd';
        grid[st+3][st+3] = 'd';

        grid[st+0][st+2] = 'e';
        grid[st+1][st+2] = 'e';

        grid[st+0][st+3] = 'f';
        grid[st+1][st+3] = 'f';

        grid[st+2][st+0] = 'g';
        grid[st+3][st+0] = 'g';
        
        grid[st+2][st+1] = 'h';
        grid[st+3][st+1] = 'h';
    }

    for (int r = 0; r<N;r++) {
        for (int c=0;c<N;c++) cout << grid[r][c];
        cout << "\n";
    }
}


Measured memory_bytes: 2176