#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define ULL unsigned long long
#define mp make_pair
#define pb push_back
#define pii pair<int,int>
#define pll pair<LL,LL>
#define x first
#define y second
#define pi acos(-1)
#define sqr(x) ((x)*(x))
#define pdd pair<double,double>
#define MEMS(x) memset(x,-1,sizeof(x))
#define MEM(x) memset(x,0,sizeof(x))
#define less Less
#define EPS 1e-4
#define arg ARG
#define cpdd const pdd
#define rank Rank
#define KK 500
#define MXN 200005
/*
int val[15][15];
set<int> s[15];
void dfs(int x,int y,int n,int now){
    if(y==n){
        int ok=0;
        s[x].clear();
        for(int i = 0;i<n;i++){
            if(val[x][i])ok=1,s[x].insert(val[x][i]);
        }
        
        if(!ok)return;
        if(x>0&&s[x].size()!=s[x-1].size())return;
        y=0,x++;
    }
    if(x==n){
        set<int> s[15],s2[15];
        for(int i = 0;i<n;i++){
            for(int j=0;j<n;j++){
                if(val[i][j]){
                    s[i].insert(val[i][j]);
                    s2[j].insert(val[i][j]);
                }
            }
        }
        int vval=s[0].size();
        int ok=1;
        for(int i = 0;i<n;i++){
            if(vval!=s[i].size()||vval!=s2[i].size())ok=0;
        }
        if(ok){
            for(int i = 0;i<n;i++){
                for(int j=0;j<n;j++){
                    printf("%2d",val[i][j]);
                }
                printf("\n");
            }
            printf("\n");
        }
        return ;
    }
    if(val[x][y]==0){
        dfs(x,y+1,n,now);
        if(y!=n-1&&val[x][y+1]==0){
            val[x][y+1]=now;
            val[x][y]=now;
            dfs(x,y+1,n,now+1);
            val[x][y+1]=0;
            val[x][y]=0;
        }
        if(x!=n-1){
            val[x][y]=now;
            val[x+1][y]=now;
            dfs(x,y+1,n,now+1);
            val[x][y]=0;
            val[x+1][y]=0;
        }
    }
    else{
        dfs(x,y+1,n,now);
    }
}
int main(){
    int n;
    scanf("%d",&n);
    if(n==2){
        printf("-1\n");
    }
    else{
        dfs(0,0,n,1);
    }
}*/
char ans[1005][1005];
char ffff[10][10]={
    "aabd",
    "ccbd",
    "efgg",
    "efhh"
};
char fffff[10][10]={
    "..abc",
"..abc",
"ddeef",
"ggh.f",
"iihjj",
};
int main(){
    int n;
    scanf("%d",&n);
    if(n==2){
        printf("-1\n");
    }
    else{
        if(n%3==0){
            for(int i = 0;i<n;i++){
                for(int j =0;j<n;j++){
                    if(i==j&&i%3!=1)printf("a");
                    else if(i+1==j&&i%3!=2)printf("a");
                    else printf(".");
                }
                printf("\n");
            }
        }
        else{
            if(n==7){
                printf("....abc\n....abc\n..dd.ef\n....gef\nhhiig..\njj..kkl\nmmnn..l\n");
            }
            else if(n==11){
                printf("....abc....\n....abc....\n..dd.ef....\n....gef....\nhhiig......\njj..kkl....\nmmnn..l....\n.......cdee\n.......cdff\n.......bbgh\n.......aagh\n");
            }
            else{
                MEM(ans);
                for(int i = 0;i<n;i++)
                    for(int j=0;j<n;j++){
                        ans[i][j]='.';
                    }
                for(int i = 0;4*i<=n;i++){
                    if((n-4*i)%5==0){
                        int four=i,five=(n-4*i)/5;
                        for(int a=0;a<four;a++){
                            for(int x=0;x<4;x++){
                                for(int y=0;y<4;y++){
                                    ans[a*4+x][a*4+y]=ffff[x][y];
                                }
                            }
                        }
                        for(int b=0;b<five;b++){
                            for(int x=0;x<5;x++){
                                for(int y=0;y<5;y++){
                                    ans[four*4+b*5+x][four*4+b*5+y]=fffff[x][y];
                                }
                            }
                        }
                        for(int i=0;i<n;i++){
                            printf("%s\n",ans[i]);
                        }
                        break;
                    }
                }
            }
        }
    }
}
/*
3 1
4 3
aabd
ccbd
efgg
efhh
5 3
0 0 1 2 3
0 0 1 2 3
4 4 5 5 6
7 7 8 0 6
9 9 81010
..abc
..abc
ddeef
ggh.f
iihjj
6 3 3
7 ?
 0 0 0 0 1 2 3
 0 0 0 0 1 2 3
 0 0 4 4 0 5 6
 0 0 0 0 7 5 6
 8 8 9 9 7 0 0
1010 0 0111112
13131414 0 012
....abc
....abc
..dd.ef
....gef
hhiig..
jj..kkl
mmnn..l
8 4 4
9 4 5
10 5 5
11 ?
....abc....
....abc....
..dd.ef....
....gef....
hhiig......
jj..kkl....
mmnn..l....
.......cdee
.......cdff
.......bbgh
.......aagh
12 3 3 3 3
13 4 4 5
14 4 5 5
15 5 5 5
16 4 4 4 4
17 4 4 4 5
*/

Measured memory_bytes: 2176