#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,mmx,avx")
#include "bits/stdc++.h"
#include <assert.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define PB push_back
#define MP make_pair
const int MOD=1000000007;
#define endl "\n"
#define fst first
#define snd second
const int UNDEF = -1;
const int INF=1<<30;
template<typename T> inline bool chkmax(T &aa, T bb) { return aa < bb ? aa = bb, true : false; }
template<typename T> inline bool chkmin(T &aa, T bb) { return aa > bb ? aa = bb, true : false; }
typedef pair<ll,ll> pll;typedef vector<ll> vll;typedef pair<int,int> pii;typedef vector<int> vi;typedef vector<vi> vvi;
#ifdef ONLINE_JUDGE
#define assert(...) /* nothing */
#endif
#define DEBUG_CAT
#ifdef DEBUG_CAT
#define dbg(...)   printf( __VA_ARGS__ )
#else 
#define dbg(...)   /****nothing****/
#endif
// mt19937 rng; rng.seed(std::chrono::high_resolution_clock::now().time_since_epoch().count());
// template<typename T> int bins(vector<T> &v, T key) {int imin=0,imax=v.size();while(imin<imax) {int imid=(imin+imax)>>1;if (v[imid]<key) imin=imid+1;else imax=imid;}return imin;}
vector<string> a;
void hor(int x, int y, char c) {
  a[x][y]=c;
  a[x][y+1]=c;
}
void ver(int x, int y, char c) {
  a[x][y]=c;
  a[x+1][y]=c;
}
void tri(int x, int y) {
  a[x][y]='y';
  a[x+1][y]='y';
  a[x+2][y+1]='z';
  a[x+2][y+2]='z';
}

vector<string> g={
  ".bb.k.o",
  ".l..k.o",
  "jldd...",
  "j...eei",
  "n.hh..i",
  "n..m.gg",
  "ff.mcc."
};

void out(int t4,int t6,int t7,int t9) {
  for (int s=0;s<t4;s++) {
    int k=s*4;
    hor(k,k,'a');
    hor(k+1,k,'b');
    hor(k+2,k+2,'c');
    hor(k+3,k+2,'d');
    ver(k+2,k,'e');
    ver(k+2,k+1,'f');
    ver(k,k+2,'g');
    ver(k,k+3,'h');
  }
  for (int s=0;s<t6;s++) {
    int k=t4*4+s*6;
    char c='a';
    for (int x=k;x<=k+1;x++) {
      for (int y=k;y<=k+4;y+=2) {
        hor(x,y,c); ++c;
      }
    }
    for (int y=k;y<=k+4;y+=2) {
      ver(k+2,y,c); ++c;
    }
    for (int y=k+1;y<=k+5;y+=2) {
      ver(k+4,y,c); ++c;
    }
  }
  for (int s=0;s<t7;s++) {
    int k=t4*4+t6*6+s*7;
    for (int x=0;x<7;x++) for (int y=0;y<7;y++) {
      a[k+x][k+y]=g[x][y];
    }
  }
  for (int s=0;s<t9;s++) {
    int k=t4*4+t6*6+t7*7+s*9;
    for (int x=k;x<k+9;x+=3) for (int y=k;y<k+9;y+=3) tri(x,y);
  }
  for (auto &s:a) cout<<s<<endl;
  exit(0);
}

int b[16][16];

bool bf(int n) {
  memset(b,0,sizeof b);
  int h=0,v=0;
  int id=1;
  int e=1+(rand()%(2*n));
  int tries=20;
  while(h<e) {
    int x=rand()%n,y=rand()%(n-1);
    if (b[x][y]==0 && b[x][y+1]==0) {
      b[x][y]=id; b[x][y+1]=id; ++id; ++h;
      tries=20;
    }
    if (--tries < 0) return false;
  }
  tries=20;
  while(v<e) {
    int x=rand()%(n-1),y=rand()%n;
    if (b[x][y]==0 && b[x+1][y]==0) {
      b[x][y]=id; b[x+1][y]=id; ++id; ++v;
      tries=20;
    }
    if (--tries < 0) return false;
  }
  int sig=1;
  for (int x=0;x<n;x++) sig|=1<<b[0][x];
  int t=__builtin_popcount(sig);
  for (int x=0;x<n;x++) {
    sig=1;
    for (int y=0;y<n;y++) {
      sig|=1<<b[x][y];
    }
    if (__builtin_popcount(sig)!=t) return false;
  }
  for (int x=0;x<n;x++) {
    sig=1;
    for (int y=0;y<n;y++) {
      sig|=1<<b[y][x];
    }
    if (__builtin_popcount(sig)!=t) return false;
  }
  for (int x=0;x<n;x++) {
    for (int y=0;y<n;y++) {
      printf("%c",b[x][y]==0?'.':('a'+b[x][y]));
    }
    printf("\n");
  }
  printf("t:%d\n",t);
  exit(0);
  return true;
}
vector<string> h5={
"jg.ee",
"jgff.",
"ccibb",
"h.i.k",
"hdd.k"
};
int main(){
  //while(1) bf(5);
	int n; cin>>n;
  if (n==5) {
    for (auto s:h5) cout<<s<<endl;
    exit(0);
  }
  a.resize(n);
  for (int i=0;i<n;i++) a[i].resize(n,'.');
  if (n%3==0) {
    for (int k=0;k<n;k+=3) {
      tri(k,k);
    }
    for (auto &s:a) cout<<s<<endl;
    exit(0);
  } else {
    int m=n; int _t9=0;
    while(m>=0&&m%4) {
      m-=9; _t9++;
    }
    if (m<0) {
      // n <= 23 by frobenius coin problem
      for (int t9=0;t9<=n/9;t9++) {
        for (int t7=0;t7<=n/7;t7++) {
          for (int t6=0;t6<=n/6;t6++) {
            int rem=n-9*t9-7*t7-6*t6;
            if (rem>=0 && rem%4==0) {
              int t4=rem/4;
              out(t4,t6,t7,t9);
            }
          }
        }
      }
      printf("-1\n");
    } else {
      int t9=_t9;
      int t4=m/4;
      out(t4,0,0,t9);
    }
  }
}



Measured memory_bytes: 2304