#include<bits/stdc++.h>
#define ri register int
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> poly;
#define pb push_back
#define fi first
#define se second
const int rlen=1<<18|1;
char buf[rlen],*ib=buf,*ob=buf;
#define gc() (((ib==ob)&&(ob=(ib=buf)+fread(buf,1,rlen,stdin)),ib==ob)?-1:*ib++)
inline int read() {
  int ans=0;
  char ch=gc();
  while(!isdigit(ch)) ch=gc();
  while(isdigit(ch)) ans=((ans<<2)+ans<<1)+(ch^48),ch=gc();
  return ans;
}
char c3[3][3]={
  {'.','.','a'},
  {'.','.','a'},
  {'a','a','.'}
};
char c4[4][4]={
  {'a','b','e','e'},
  {'a','b','f','f'},
  {'c','c','g','h'},
  {'d','d','g','h'}
};
char c5[5][5]={
  {'a','a','b','b','a'},
  {'b','c','c','.','a'},
  {'b','.','.','c','b'},
  {'a','.','.','c','b'},
  {'a','b','b','a','a'}
};
char c7[7][7]={
  {'a','.','a','a','.','a','a'},
  {'a','b','.','.','b','b','.'},
  {'.','b','.','a','a','.','a'},
  {'a','.','a','.','.','.','a'},
  {'a','.','a','.','.','b','.'},
  {'.','b','b','.','.','b','a'},
  {'a','a','.','a','a','.','a'}
};
int n;
char ans[1005][1005];
int main() {
  #ifdef ldxcaicai
  freopen("lx.in","r",stdin);
  #endif
  cin>>n;
  if(n<3) puts("-1");
  else {
    for(ri i=1;i<=n;++i) for(ri j=1;j<=n;++j) ans[i][j]='.';
    if(n%3==0) {
      for(ri i=1;i<=n;i+=3) for(ri dx=0;dx<3;++dx)
      for(ri dy=0;dy<3;++dy)ans[i+dx][i+dy]=c3[dx][dy];
    }
    else {
      int x=-1,y=-1,z=-1;
      for(ri i=0;i*4<=n&&x==-1;++i) for(ri j=0;i*4+j*5<=n;++j) if((n-i*4-j*5)%7==0) {
        x=i,y=j,z=(n-i*4-j*5)/7;
        break;
      }
      int ps=1;
      while(x--) {
        for(ri dx=0;dx<4;++dx) for(ri dy=0;dy<4;++dy) ans[ps+dx][ps+dy]=c4[dx][dy];
        ps+=4;
      }
      while(y--) {
        for(ri dx=0;dx<5;++dx) for(ri dy=0;dy<5;++dy) ans[ps+dx][ps+dy]=c5[dx][dy];
        ps+=5;
      }
      while(z--) {
        for(ri dx=0;dx<7;++dx) for(ri dy=0;dy<7;++dy) ans[ps+dx][ps+dy]=c7[dx][dy];
        ps+=7;
      }
    }
    for(ri i=1;i<=n;++i,puts("")) for(ri j=1;j<=n;++j) cout<<ans[i][j];
  }
  return 0;
}
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

#define REP(i, n) for(int i=0; i<(n); ++i)
#define FOR(i, a, b) for(int i=(a); i<(b); ++i)
#define FORR(i, a, b) for(int i=(b)-1; i>=(a); --i)

#define DEBUG(x) cout<<#x<<": "<<(x)<<'\n'
#define DEBUG_VEC(v) cout<<#v<<":";REP(i, v.size())cout<<' '<<v[i];cout<<'\n'
#define ALL(a) (a).begin(), (a).end()

template<typename T> inline void CHMAX(T& a, const T b) {if(a<b) a=b;}
template<typename T> inline void CHMIN(T& a, const T b) {if(a>b) a=b;}

constexpr ll MOD=1000000007ll;
// constexpr ll MOD=998244353ll;
#define FIX(a) ((a)%MOD+MOD)%MOD

const double EPS=1e-11;
#define EQ0(x) (abs((x))<EPS)
#define EQ(a, b) (abs((a)-(b))<EPS)

char ans[1252][1252];
string three[3]={"aa.", "..a", "..a"};
string four[4]={"aabc", "ddbc", "bcaa", "bcdd"};
string five[5]{"aabba", "bcc.a", "b..cb", "a..cb", "abbaa"};
string six[6]={"aabc..", "ddbc..", "..aabc", "..ddbc", "bc..aa", "bc..dd"};
string seven[7]={"aabbcc.", "dd.dd.a", "..d..da", "..d..db", "dd.dd.b", "..d..dc", "..d..dc"};

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  // cout<<setprecision(10)<<fixed;
  int n;
  cin>>n;
  REP(i, n){
    REP(j, n){
      ans[i][j]='.';
    }
  }
  if(n==2){
    cout<<-1<<'\n';
    return 0;
  }
  int cur=n;
  while(cur>7){
    REP(i, 4){
      REP(j, 4){
        ans[i+n-cur][j+n-cur]=four[i][j];
      }
    }
    cur-=4;
  }
  if(cur==3){
    REP(i, 3){
      REP(j, 3){
        ans[i+n-cur][j+n-cur]=three[i][j];
      }
    }
  }
  else if(cur==4){
    REP(i, 4){
      REP(j, 4){
        ans[i+n-cur][j+n-cur]=four[i][j];
      }
    }
  }
  else if(cur==5){
    REP(i, 5){
      REP(j, 5){
        ans[i+n-cur][j+n-cur]=five[i][j];
      }
    }
  }
  else if(cur==6){
    REP(i, 6){
      REP(j, 6){
        ans[i+n-cur][j+n-cur]=six[i][j];
      }
    }
  }
  else{
    REP(i, 7){
      REP(j, 7){
        ans[i+n-cur][j+n-cur]=seven[i][j];
      }
    }
  }
  REP(i, n){
    REP(j, n){
      cout<<ans[i][j];
    }
    cout<<'\n';
  }
  return 0;
}
