#include <cassert>
#include <algorithm>
#include <cctype>
#include <complex>
#include <string>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <sstream>
#include <tuple>
#include <typeinfo>
#include <unordered_set>
#include <unordered_map>
#include <vector>
using namespace std;

#define REP2(i, m, n) for(int i = (int)(m); i < (int)(n); i++)
#define REPD(i, n) for(int i = (int)(n) - 1; i >= 0; i--)
#define REP(i, n) REP2(i, 0, n)
#define ALL(c) (c).begin(), (c).end()
#define PB(e) push_back(e)
#define FOREACH(i, c) for(auto i = (c).begin(); i != (c).end(); ++i)
#define MP(a, b) make_pair(a, b)
#define BIT(n, m) (((n) >> (m)) & 1)

typedef long long ll;

template <typename S, typename T> ostream &operator<<(ostream &out, const pair<S, T> &p) {
  out << "(" << p.first << ", " << p.second << ")";
  return out;
}

template <typename T> ostream &operator<<(ostream &out, const vector<T> &v) {
  out << "[";
  REP(i, v.size()){
    if (i > 0) out << ", ";
    out << v[i];
  }
  out << "]";
  return out;
}


int main(int argc, char *argv[]) {
  int N;
  cin >> N;
  vector<string> vs(N, string(N, '.'));
  vector<string> four;
  four.push_back("aabc");
  four.push_back("ccbc");
  four.push_back("abdd");
  four.push_back("abcc");
  
  vector<string> five;
  five.push_back("abbcc");
  five.push_back("ae..d");
  five.push_back("be..d");
  five.push_back("b.cca");
  five.push_back("ccbba");
  vector<string> seven;
  seven.push_back(".bbccbb");
  seven.push_back("b.aa.aa");
  seven.push_back("ba..a..");
  seven.push_back("ca..a..");
  seven.push_back("c.aa.aa");
  seven.push_back("ba..a..");
  seven.push_back("ba..a..");
  

  if (N % 3 == 0) {
    int m = N / 3;
    REP(i, m) {
      vs[i * 3][i * 3 + 1] = 'a';
      vs[i * 3][i * 3 + 2] = 'a';
      vs[i * 3 + 1][i * 3] = 'a';
      vs[i * 3 + 2][i * 3] = 'a';
    }
  } else if (N % 3 == 1) {
    if (N == 4) {
      vs = four;
    } else if (N == 7) {
      vs = seven;
    } else {
      REP(i, 4) REP(j, 4) {
        vs[i][j] = four[i][j];
      }
      for (int c = 4; c < N; c += 3) {
        vs[c][c + 1] = 'a';
        vs[c][c + 2] = 'a';
        vs[c + 1][c] = 'a';
        vs[c + 2][c] = 'a';
        int offset = c + 3 == N ? 4 : c + 3;
        vs[offset + 0][c + 0] = 'b';
        vs[offset + 0][c + 1] = 'b';
        vs[offset + 0][c + 2] = 'c';
        vs[offset + 1][c + 2] = 'c';
        vs[offset + 2][c + 2] = 'b';
        vs[offset + 2][c + 1] = 'b';
        vs[offset + 2][c + 0] = 'c';
        vs[offset + 1][c + 0] = 'c';
      }
    }
  } else {
    if (N == 2) {
      cout << -1 << endl;
      return 0;
    } else if (N == 5) {
      vs = five;
    } else if (N == 8) {
      REP(i, 4) REP(j, 4) {
        vs[i][j] = four[i][j];
        vs[i + 4][j + 4] = four[i][j];
      }
    } else {
      REP(i, 5) REP(j, 5) {
        vs[i][j] = five[i][j];
      }
      for (int c = 5; c < N; c += 3) {
        vs[c][c + 1] = 'a';
        vs[c][c + 2] = 'a';
        vs[c + 1][c] = 'a';
        vs[c + 2][c] = 'a';
        int offset = c + 3 == N ? 5 : c + 3;
        vs[offset + 0][c + 0] = 'b';
        vs[offset + 0][c + 1] = 'b';
        vs[offset + 0][c + 2] = 'c';
        vs[offset + 1][c + 2] = 'c';
        vs[offset + 2][c + 2] = 'b';
        vs[offset + 2][c + 1] = 'b';
        vs[offset + 2][c + 0] = 'c';
        vs[offset + 1][c + 0] = 'c';
      }
    }
  }
  REP(i, vs.size()) {
    cout << vs[i] << endl;
  }
}


Measured memory_bytes: 2304