#include<bits/stdc++.h>
#define N 100009
#define ll long long
#define ff first
#define ss second
#define mod 998244353
using namespace std;
int n;
char ans[1009][1009];
int main() {
    cin>>n;
    if(n%3 == 0) {
        int q = n / 3;
        for(int i=1;i<=n-q;i+=2) {
            for(int j=1;j<=q;j++) {
                if(ans[i-1][j] !='a' && ans[i][j - 1]!='a') {
                    ans[i][j] = 'a';
                    ans[i + 1][j] = 'a';
                }
                else {
                    ans[i][j] = 'b';
                    ans[i + 1][j] = 'b';
                }
            }
        }
        for(int i=n-q+1;i<=n;i++) {
            for(int j=q+1;j<=n;j+=2) {
                if(ans[i-1][j] !='a' && ans[i][j - 1]!='a') {
                    ans[i][j] = 'a';
                    ans[i][j + 1] = 'a';
                }
                else {
                    ans[i][j] = 'b';
                    ans[i][j + 1] = 'b';
                }
            }
        }
        for(int i=1;i<=n;i++) {
            for(int j=1;j<=n;j++) {
                if(ans[i][j] !='a' && ans[i][j]!='b')
                    cout<<".";
                else
                    cout<<ans[i][j];
            }
            cout<<endl;
        }
        return 0;
    }
    if(n%4 == 0) {
        for(int i=1;i<=n;i+=4) {
            int j = i;
            ans[i][j] = 'a';
            ans[i][j + 1] = 'a';
            ans[i + 1][j] = 'b';
            ans[i + 1][j + 1] = 'b';
            ans[i][j + 2] = 'c';
            ans[i + 1][j + 2] = 'c';
            ans[i][j + 3] = 'a';
            ans[i + 1][j + 3] = 'a';
            ans[i + 2][j] = 'a';
            ans[i + 3][j] = 'a';
            ans[i + 2][j + 1] = 'c';
            ans[i + 3][j + 1] = 'c';
            ans[i + 2][j + 2] = 'b';
            ans[i + 2][j + 3] = 'b';
            ans[i + 3][j + 2] = 'a';
            ans[i + 3][j + 3] = 'a';
        }
        for(int i=1;i<=n;i++) {
            for(int j=1;j<=n;j++) {
                if(ans[i][j] !='a' && ans[i][j]!='b' && ans[i][j]!='c')
                    cout<<".";
                else
                    cout<<ans[i][j];
            }
            cout<<endl;
        }
        return 0;
    }
    int i = 1, j = 1, nn = n;
    while(nn > 0) {
        if(nn % 5 == 0) {
            for(;i<=n;i+=5, j+=5) {
                ans[i][j] = 'a';
                ans[i][j + 1] = 'a';
                ans[i][j + 2] = 'b';
                ans[i][j + 3] = 'b';
                ans[i][j + 4] = 'a';
                ans[i + 1][j] = 'b';
                ans[i + 1][j + 1] = 'b';
                ans[i + 1][j + 2] = 'a';
                ans[i + 1][j + 4] = 'a';
                ans[i + 2][j] = 'c';
                ans[i + 2][j + 1] = 'c';
                ans[i + 2][j + 2] = 'a';
                ans[i + 2][j + 3] = 'b';
                ans[i + 2][j + 4] = 'b';
                ans[i + 3][j + 2] = 'b';
                ans[i + 3][j + 3] = 'a';
                ans[i + 3][j + 4] = 'c';
                ans[i + 4][j + 2] = 'b';
                ans[i + 4][j + 3] = 'a';
                ans[i + 4][j + 4] = 'c';
            }
            for(int i=1;i<=n;i++) {
                for(int j=1;j<=n;j++) {
                    if(ans[i][j] < 'a' || ans[i][j] > 'z')
                        cout<<".";
                    else
                        cout<<ans[i][j];
                }
                cout<<endl;
            }
            return 0;
        }
        if(nn % 6 == 0) {
            for(;i<=n;i+=6, j+=6) {
                ans[i][j] = 'a';
                ans[i][j + 1] = 'a';
                ans[i][j + 2] = 'b';
                ans[i][j + 3] = 'c';

                ans[i + 1][j] = 'd';
                ans[i + 1][j + 1] = 'd';
                ans[i + 1][j + 2] = 'b';
                ans[i + 1][j + 3] = 'c';

                ans[i + 2][j + 2] = 'a';
                ans[i + 2][j + 3] = 'a';
                ans[i + 2][j + 4] = 'b';
                ans[i + 2][j + 5] = 'c';

                ans[i + 3][j + 2] = 'd';
                ans[i + 3][j + 3] = 'd';
                ans[i + 3][j + 4] = 'b';
                ans[i + 3][j + 5] = 'c';

                ans[i + 4][j] = 'b';
                ans[i + 4][j + 1] = 'c';
                ans[i + 4][j + 4] = 'a';
                ans[i + 4][j + 5] = 'a';

                ans[i + 5][j] = 'b';
                ans[i + 5][j + 1] = 'c';
                ans[i + 5][j + 4] = 'd';
                ans[i + 5][j + 5] = 'd';
            }
            for(int i=1;i<=n;i++) {
                for(int j=1;j<=n;j++) {
                    if(ans[i][j] < 'a' || ans[i][j] > 'z')
                        cout<<".";
                    else
                        cout<<ans[i][j];
                }
                cout<<endl;
            }
            return 0;
        }
        if(nn % 7 == 0) {
            for(;i<=n;i+=7, j+=7) {
                ans[i][j] = 'a';
                ans[i][j + 1] = 'a';
                ans[i][j + 2] = 'b';
                ans[i][j + 3] = 'b';
                ans[i][j + 4] = 'c';
                ans[i][j + 5] = 'c';

                ans[i + 1][j] = 'd';
                ans[i + 1][j + 1] = 'd';
                ans[i + 1][j + 3] = 'd';
                ans[i + 1][j + 4] = 'd';
                ans[i + 1][j + 6] = 'a';

                ans[i + 2][j + 2] = 'd';
                ans[i + 2][j + 5] = 'd';
                ans[i + 2][j + 6] = 'a';

                ans[i + 3][j + 2] = 'd';
                ans[i + 3][j + 5] = 'd';
                ans[i + 3][j + 6] = 'b';

                ans[i + 4][j] = 'd';
                ans[i + 4][j + 1] = 'd';
                ans[i + 4][j + 3] = 'd';
                ans[i + 4][j + 4] = 'd';
                ans[i + 4][j + 6] = 'b';

                ans[i + 5][j + 2] = 'd';
                ans[i + 5][j + 5] = 'd';
                ans[i + 5][j + 6] = 'c';

                ans[i + 6][j + 2] = 'd';
                ans[i + 6][j + 5] = 'd';
                ans[i + 6][j + 6] = 'c';
            }
            for(int i=1;i<=n;i++) {
                for(int j=1;j<=n;j++) {
                    if(ans[i][j] < 'a' || ans[i][j] > 'z')
                        cout<<".";
                    else
                        cout<<ans[i][j];
                }
                cout<<endl;
            }
            return 0;
        }
        ans[i][j] = 'a';
        ans[i][j + 1] = 'a';
        ans[i + 1][j] = 'b';
        ans[i + 1][j + 1] = 'b';
        ans[i][j + 2] = 'c';
        ans[i + 1][j + 2] = 'c';
        ans[i][j + 3] = 'a';
        ans[i + 1][j + 3] = 'a';
        ans[i + 2][j] = 'a';
        ans[i + 3][j] = 'a';
        ans[i + 2][j + 1] = 'c';
        ans[i + 3][j + 1] = 'c';
        ans[i + 2][j + 2] = 'b';
        ans[i + 2][j + 3] = 'b';
        ans[i + 3][j + 2] = 'a';
        ans[i + 3][j + 3] = 'a';
        i += 4;
        j += 4;
        nn -= 4;
    }
    cout<<-1;
}


Measured memory_bytes: 2176