#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef pair<P,P> P2;
char three[3][3],four[4][4],five[5][5],seven[7][7];
char ans[1005][1005];
P2 mk_P(ll a,ll b,ll c,ll d){
  return P2(P(a,b),P(c,d));
}
void set_num(ll num,vector<P2> vec){
  char nc='a';
  for(int i=0;i<vec.size();i++){
    ll x1=vec[i].first.first,y1=vec[i].first.second;
    ll x2=vec[i].second.first,y2=vec[i].second.second;
    if(num==3){
      three[x1][y1]=nc;
      three[x2][y2]=nc;
    }
    if(num==4){
      four[x1][y1]=nc;
      four[x2][y2]=nc;
    }
    if(num==5){
      five[x1][y1]=nc;
      five[x2][y2]=nc;
    }
    if(num==7){
      seven[x1][y1]=nc;
      seven[x2][y2]=nc;
    }
    nc++;
  }
}
void setup(){
  for(int i=0;i<3;i++) for(int j=0;j<3;j++) three[i][j]='.';
  for(int i=0;i<4;i++) for(int j=0;j<4;j++) four[i][j]='.';
  for(int i=0;i<5;i++) for(int j=0;j<5;j++) five[i][j]='.';
  for(int i=0;i<7;i++) for(int j=0;j<7;j++) seven[i][j]='.';

  vector<P2> san,yon,go,nana;
  san.push_back(mk_P(0,0,0,1));
  san.push_back(mk_P(1,2,2,2));

  yon.push_back(mk_P(0,0,0,1));
  yon.push_back(mk_P(1,0,1,1));
  yon.push_back(mk_P(0,2,1,2));
  yon.push_back(mk_P(0,3,1,3));
  yon.push_back(mk_P(2,0,3,0));
  yon.push_back(mk_P(2,1,3,1));
  yon.push_back(mk_P(2,2,2,3));
  yon.push_back(mk_P(3,2,3,3));

  go.push_back(mk_P(0,0,0,1));
  go.push_back(mk_P(0,2,0,3));
  go.push_back(mk_P(0,4,1,4));
  go.push_back(mk_P(1,2,1,3));
  go.push_back(mk_P(1,1,2,1));
  go.push_back(mk_P(2,0,3,0));
  go.push_back(mk_P(4,0,4,1));
  go.push_back(mk_P(3,2,4,2));
  go.push_back(mk_P(4,3,4,4));
  go.push_back(mk_P(2,4,3,4));

  nana.push_back(mk_P(0,0,1,0));
  nana.push_back(mk_P(2,0,3,0));
  nana.push_back(mk_P(6,0,6,1));
  nana.push_back(mk_P(2,1,2,2));
  nana.push_back(mk_P(4,1,5,1));
  nana.push_back(mk_P(4,2,5,2));
  nana.push_back(mk_P(0,2,0,3));
  nana.push_back(mk_P(0,5,0,6));
  nana.push_back(mk_P(1,4,1,5));
  nana.push_back(mk_P(1,6,2,6));
  nana.push_back(mk_P(3,5,4,5));
  nana.push_back(mk_P(3,3,3,4));
  nana.push_back(mk_P(6,3,6,4));
  nana.push_back(mk_P(5,6,6,6));

  set_num(3,san);
  set_num(4,yon);
  set_num(5,go);
  set_num(7,nana);
}
void solve(ll n,vector<ll> vec){
  ll pos=0;
  for(int i=0;i<n;i++) for(int j=0;j<n;j++) ans[i][j]='.';
  for(int i=0;i<vec.size();i++){
    for(int x=0;x<vec[i];x++){
      for(int y=0;y<vec[i];y++){
        ll px=pos+x,py=pos+y;
        if(vec[i]==3) ans[px][py]=three[x][y];
        if(vec[i]==4) ans[px][py]=four[x][y];
        if(vec[i]==5) ans[px][py]=five[x][y];
        if(vec[i]==7) ans[px][py]=seven[x][y];
      }
    }
    pos+=vec[i];
  }
  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++) cout<<ans[i][j];
    cout<<endl;
  }
}
int main(){
  ll n;
  cin>>n;
  ll fn=n;
  vector<ll> vec;
  if(n==2){
    cout<<"-1"<<endl;
    return 0;
  }
  else if(n==3) vec.push_back(3);
  else if(n==6) {
    vec.push_back(3);
    vec.push_back(3);
  }
  else if(n==7){
    vec.push_back(7);
  }
  else if(n==11){
    vec.push_back(7);
    vec.push_back(4);
  }
  else{
    while(n%4!=0){
      vec.push_back(5);
      n-=5;
    }
    while(n>0){
      vec.push_back(4);
      n-=4;
    }
  }
  setup();
  solve(fn,vec);
}


Measured memory_bytes: 2176