#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;
struct __INIT{__INIT(){cin.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(15);}} __init;
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
#define MOD 1000000007
#define INF (1<<30)
#define LINF (lint)(1LL<<56)
#define endl "\n"
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define reprev(i,n) for(int (i)=(n-1);(i)>=0;(i)--)
#define Flag(x) (1<<(x))
#define Flagcount(x) __builtin_popcount(x)
#define pint pair<int,int>
#define pdouble pair<double,double>
#define plint pair<lint,lint>
typedef unsigned long long int ull;
typedef long long lint;

int main(void){
    int N;
    cin >> N;
    if(N==2) cout << -1 << endl;
    else if(N==3){
        cout << "aa." << endl;
        cout << "..a" << endl;
        cout << "..a" << endl;
    }
    else{
        char ans[7][7][7]={};
        char a='a',b='b',c='c',d='d',z='.';
        rep(i,7) rep(j,7) rep(k,7) ans[i][j][k]='.';
        ans[3][0][0]=a,ans[3][0][1]=b,ans[3][0][2]=c,ans[3][0][3]=c;
        ans[3][1][0]=a,ans[3][1][1]=b,ans[3][1][2]=d,ans[3][1][3]=d;
        ans[3][2][0]=c,ans[3][2][1]=c,ans[3][2][2]=a,ans[3][2][3]=b;
        ans[3][3][0]=d,ans[3][3][1]=d,ans[3][3][2]=a,ans[3][3][3]=b;

        ans[4][0][0]=a,ans[4][0][1]=z,ans[4][0][2]=a,ans[4][0][3]=b,ans[4][0][4]=b;
        ans[4][1][0]=a,ans[4][1][1]=b,ans[4][1][2]=a,ans[4][1][3]=z,ans[4][1][4]=z;
        ans[4][2][0]=z,ans[4][2][1]=b,ans[4][2][2]=c,ans[4][2][3]=d,ans[4][2][4]=d;
        ans[4][3][0]=a,ans[4][3][1]=a,ans[4][3][2]=c,ans[4][3][3]=z,ans[4][3][4]=b;
        ans[4][4][0]=b,ans[4][4][1]=b,ans[4][4][2]=a,ans[4][4][3]=a,ans[4][4][4]=b;

        ans[5][0][0]=a,ans[5][0][1]=z,ans[5][0][2]=z,ans[5][0][3]=b,ans[5][0][4]=a,ans[5][0][5]=a;
        ans[5][1][0]=a,ans[5][1][1]=z,ans[5][1][2]=c,ans[5][1][3]=b,ans[5][1][4]=z,ans[5][1][5]=z;
        ans[5][2][0]=z,ans[5][2][1]=z,ans[5][2][2]=c,ans[5][2][3]=z,ans[5][2][4]=c,ans[5][2][5]=b;
        ans[5][3][0]=a,ans[5][3][1]=a,ans[5][3][2]=z,ans[5][3][3]=z,ans[5][3][4]=c,ans[5][3][5]=b;
        ans[5][4][0]=b,ans[5][4][1]=b,ans[5][4][2]=d,ans[5][4][3]=d,ans[5][4][4]=z,ans[5][4][5]=a;
        ans[5][5][0]=z,ans[5][5][1]=a,ans[5][5][2]=a,ans[5][5][3]=c,ans[5][5][4]=c,ans[5][5][5]=a;

        ans[6][0][0]=z,ans[6][0][1]=a,ans[6][0][2]=a,ans[6][0][3]=z,ans[6][0][4]=b,ans[6][0][5]=a,ans[6][0][6]=a;
        ans[6][1][0]=a,ans[6][1][1]=z,ans[6][1][2]=z,ans[6][1][3]=a,ans[6][1][4]=b,ans[6][1][5]=z,ans[6][1][6]=z;
        ans[6][2][0]=a,ans[6][2][1]=z,ans[6][2][2]=z,ans[6][2][3]=a,ans[6][2][4]=z,ans[6][2][5]=a,ans[6][2][6]=a;
        ans[6][3][0]=z,ans[6][3][1]=a,ans[6][3][2]=a,ans[6][3][3]=z,ans[6][3][4]=a,ans[6][3][5]=b,ans[6][3][6]=b;
        ans[6][4][0]=b,ans[6][4][1]=z,ans[6][4][2]=z,ans[6][4][3]=c,ans[6][4][4]=a,ans[6][4][5]=z,ans[6][4][6]=z;
        ans[6][5][0]=b,ans[6][5][1]=z,ans[6][5][2]=z,ans[6][5][3]=c,ans[6][5][4]=b,ans[6][5][5]=z,ans[6][5][6]=z;
        ans[6][6][0]=a,ans[6][6][1]=a,ans[6][6][2]=d,ans[6][6][3]=d,ans[6][6][4]=b,ans[6][6][5]=z,ans[6][6][6]=z;

        int rem=N,minus=0;
        while(rem>7){
            rep(i,4){
                rep(j,N){
                    if(j-minus>=0 && j-minus<4) cout << ans[3][i][j-minus];
                    else cout << ".";
                }
                cout << endl;
            }
            rem-=4,minus+=4;
        }
        char last[rem][N];
        rep(i,rem) rep(j,N) last[i][j]='.';
        for(int i=0;i<rem;i++) for(int j=N-1-rem;j<N;j++) last[i][j+1]=ans[rem-1][i][j-(N-1-rem)];
        rep(i,rem){
            rep(j,N) cout << last[i][j];
            cout << endl;
        }
    }
}

Measured memory_bytes: 1280