#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define REP(i,n) for(int i=0,_n=(int)(n);i<_n;++i)
#define ALL(v) (v).begin(),(v).end()
#define CLR(t,v) memset(t,(v),sizeof(t))
template<class T1,class T2>ostream& operator<<(ostream& os,const pair<T1,T2>&a){return os<<"("<<a.first<<","<<a.second<< ")";}
template<class T>void pv(T a,T b){for(T i=a;i!=b;++i)cout<<(*i)<<" ";cout<<endl;}
template<class T>void chmin(T&a,const T&b){if(a>b)a=b;}
template<class T>void chmax(T&a,const T&b){if(a<b)a=b;}

int nextInt() { int x; scanf("%d", &x); return x;}
ll nextLong() { ll x; scanf("%lld", &x); return x;}


const int MAX_N = 1005;
string s[MAX_N];

string sub3[3] = {
  "iij",
  "l.j",
  "lkk",
};
string sub4[4] = {
  "aafe",
  "bbfe",
  "hgcc",
  "hgdd",
};
string sub5[5] = {
    "aabbc",
    "hii.c",
    "h..jd",
    "g..jd",
    "gffee",
};
string sub7[7] = {
  "aabb..c",
  ".jj..kc",
  "..nn.kd",
  "h...o.d",
  "hm..o..",
  "gm..ll.",
  "g..ffee",
};

void output(int N) {
  REP(i, N) {
    REP(j, N) {
      cout << s[i][j];
    }
    cout << endl;
  }
  cout << endl;
}

int main2() {
  REP(i, MAX_N) s[i] = string(MAX_N, '.');

  int N = nextInt();

  if (N == 1 || N == 2) {
    cout << -1 << endl;
    return 0;
  }
  if (N % 3 == 0) {
    int K = N / 3;
    int br = 0, bc = 0;
    REP(step, K) {
      REP(i, 3) REP(j, 3) s[br + i][bc + j] = sub3[i][j];
      br += 3;
      bc += 3;
    }
    output(N);
    return 0;
  }
  if (N == 7) {
    int K = N / 7;
    int br = 0, bc = 0;
    REP(step, K) {
      REP(i, 7) REP(j, 7) s[br + i][bc + j] = sub7[i][j];
      br += 7;
      bc += 7;
    }
    output(N);
    return 0;
  }
  if (N == 11) {
    int br = 0, bc = 0;
    {
      REP(i, 7) REP(j, 7) s[br + i][bc + j] = sub7[i][j];
      br += 7;
      bc += 7;
    }
    {
      REP(i, 4) REP(j, 4) s[br + i][bc + j] = sub4[i][j];
      br += 4;
      bc += 4;
    }
    output(N);
    return 0;
  }

  int x = -1, y = -1;
  REP(x_, 1000) {
    REP(y_, 1000) {
      if (5 * x_ + 4 * y_ == N) {
        x = x_;
        y = y_;
        break;
      }
    }
    if (x != -1) break;
  }

  if (x == -1) {
    cout << -1 << endl;
    return 0;
  }

  int br = 0, bc = 0;
  REP(step, x) {
    REP(i, 5) REP(j, 5) s[br + i][bc + j] = sub5[i][j];
    br += 5;
    bc += 5;
  }
  REP(step, y) {
    REP(i, 4) REP(j, 4) s[br + i][bc + j] = sub4[i][j];
    br += 4;
    bc += 4;
  }
  output(N);

  return 0;
}

int main() {


  // int N = 7;
  // for (int A = 0; A <= N*N/2; A++) {
  //   for (int B = 0; B <= N*N/2; B++) {
  //     if (A*2 + B*2 > N*N) continue;
  //     if ((A+2*B) % N == 0 &&
  //       (2*A + B) % N == 0 &&
  //         (A+2*B) / N ==  (2*A + B) / N)
  //       cout << A << " " << B  << "   -> " << (A+2*B)/N << endl;
  //   }
  // }
  // return 0;

// set<int> st;
// for (int x = 0; x <= 1000; x++) {
//   for (int y = 0; y <= 1000; y++) {
//     int n = x * 5 + y*4;
//     if (n > 1000) continue;
//     if (st.count(n) == 0) {
//       st.insert(n);
//       // cout << n << " = " << x  << "x3+"  << y << "x4" << endl;
//     }
//   }
// }
// for (int n = 1; n <= 1000; n++) {
//   if (st.count(n) == 0) {
//     cout << n << endl;
//   }
// }
// return 0;


#ifdef LOCAL
  for (;!cin.eof();cin>>ws)
#endif
    main2();
  return 0;
}


Measured memory_bytes: 2304