#include <bits/stdc++.h>

#if MYDEBUG
#include "lib/cp_debug.hpp"
#else
#define DBG(...) ;
#endif
#if __cplusplus <= 201402L
template <typename T>
T gcd(T a, T b) { return ((a % b == 0) ? b : gcd(b, a % b)); }
template <typename T>
T lcm(T a, T b) { return a / gcd(a, b) * b; }
#endif
using LL = long long;
constexpr LL LINF = 334ll << 53;
constexpr int INF = 15 << 26;
constexpr LL MOD = 1E9 + 7;

namespace Problem {
using namespace std;

class Solver {
 public:
  int n;
  vector<vector<int>> ans;
  vector<vector<pair<int, int>>> memo;
  Solver(LL n) : n(n), ans(n, vector<int>(n, -1)){};

  void solve() {
    if (n == 2) {
      cout << -1 << endl;
    } else {
      calc(0, n, 0, n, 0);
      output();
    }
  }
  void write(int i1, int j1, int i2, int j2, int x) {
    ans[i1][j1] = x;
    ans[i2][j2] = x;
    memo.push_back({{i1, j1}, {i2, j2}});
  }

  int calc(int i, int I, int j, int J, int startIdx = 0, bool odd7 = false) {
    assert(I - i == J - j);
    int s = I - i;
    if (s == 3) {
      int nxtId = startIdx;
      write(i, j, i, j + 1, nxtId++);
      write(i + 1, j + 2, i + 2, j + 2, nxtId++);
      return nxtId;
    } else if (s == 4) {
      int nxtId = startIdx;
      write(i, j, i, j + 1, nxtId++);
      write(i + 1, j, i + 1, j + 1, nxtId++);
      write(i + 2, j + 2, i + 2, j + 3, nxtId++);
      write(i + 3, j + 2, i + 3, j + 3, nxtId++);
      write(i + 2, j, i + 3, j, nxtId++);
      write(i + 2, j + 1, i + 3, j + 1, nxtId++);
      write(i, j + 2, i + 1, j + 2, nxtId++);
      write(i, j + 3, i + 1, j + 3, nxtId++);
      return nxtId;
    } else if (s == 5) {
      int nxtId = startIdx;
      if (!odd7) write(i, j, i, j + 1, nxtId++);
      write(i, j + 2, i, j + 3, nxtId++);
      write(i, j + 4, i + 1, j + 4, nxtId++);
      write(i + 1, j, i + 2, j, nxtId++);
      write(i + 1, j + 1, i + 1, j + 2, nxtId++);
      write(i + 2, j + 3, i + 3, j + 3, nxtId++);
      write(i + 2, j + 4, i + 3, j + 4, nxtId++);
      write(i + 3, j, i + 4, j, nxtId++);
      write(i + 4, j + 1, i + 4, j + 2, nxtId++);
      write(i + 4, j + 3, i + 4, j + 4, nxtId++);
      return nxtId;
    } else if (s % 2 == 1) {
      int nxtId = startIdx;
      if (!odd7) write(i, j, i, j + 1, nxtId++);
      write(i + 1, j, i + 1, j + 1, nxtId++);
      write(i + 2, j, i + 2, j + 1, nxtId++);
      write(i, j + 2, i + 1, j + 2, nxtId++);
      write(i, j + 3, i + 1, j + 3, nxtId++);

      nxtId = calc(i + 2, I, j + 2, J, nxtId, true);
      return nxtId;
    } else {
      int nxtId = startIdx;
      nxtId = calc(i, i + s / 2, j, j + s / 2, nxtId);
      nxtId = calc(i, i + s / 2, j + s / 2, J, nxtId);
      nxtId = calc(i + s / 2, I, j, j + s / 2, nxtId);
      nxtId = calc(i + s / 2, I, j + s / 2, J, nxtId);
      return nxtId;
    }
  }
  int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
  void output() {
    DBG(ans)
    vector<vector<char>> table(n, vector<char>(n, ('.')));
    auto used = vector<char>(memo.size(), '.');
    for (int i = 0; i < memo.size(); ++i) {
      set<char> S;
      int x1 = memo[i][0].first;
      int y1 = memo[i][0].second;
      int x2 = memo[i][1].first;
      int y2 = memo[i][1].second;
      for (int dir = 0; dir < 4; ++dir) {
        int X1 = x1 + dx[dir];
        int Y1 = y1 + dy[dir];
        if (0 <= X1 && X1 < n && 0 <= Y1 && Y1 < n) {
          int tmp = ans[X1][Y1];
          if (tmp >= 0)
            S.insert(used[tmp]);
        }
        int X2 = x2 + dx[dir];
        int Y2 = y2 + dy[dir];
        if (0 <= X2 && X2 < n && 0 <= Y2 && Y2 < n) {
          int tmp = ans[X2][Y2];
          if (tmp >= 0)
            S.insert(used[tmp]);
        }
      }
      for (char c = 'a'; c <= 'z'; c++) {
        if (!S.count(c)) {
          table[x1][y1] = c;
          table[x2][y2] = c;
          used[i] = c;
          break;
        }
      }
    }
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < n; ++j) {
        cout << table[i][j];
      }
      cout << endl;
    }
  }
};
class Solver2 {
 public:
  int n, m;
  Solver2(LL n, LL m) : n(n), m(m){};

  void solve() {
  }
};
}  // namespace Problem

int main() {
  std::cin.tie(0);
  std::ios_base::sync_with_stdio(false);
  // std::cout << std::fixed << std::setprecision(12);
  long long n = 0;
  std::cin >> n;

  Problem::Solver sol(n);
  sol.solve();
  return 0;
}


Measured memory_bytes: 9652