#include <algorithm>
#include <iostream>
#include <string>
#include <random>
#include <cassert>
#include <cstring>
#include <chrono>

using namespace std;

char a[1000][1000];

typedef vector<vector<char>> TMatrix;

char GetColor(int i, int j) {
  vector<bool> mask(26);
  for (int x = 2 * i - 2; x < 2 * i + 4; ++x) {
    for (int y = 2 * j - 2; y < 2 * j + 4; ++y) {
      if (x < 0 || x >= 1000) continue;
      if (y < 0 || y >= 1000) continue;
      if (isalpha(a[x][y])) {
          mask[a[x][y] - 'a'] = true;
      }
    }
  }
  int ind = 0;
  while (ind < 26 && mask[ind]) {
    ind++;
  }
  assert(ind < 26);
  return 'a' + ind;
}

TMatrix Solve(int n) {
  for (;;) {
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < n; ++j) {
        a[i][j] = '.';
      }
    }

    bool ok = true;
    vector<int> h(n), v(n);
    int numSteps = 2 * n;
    if (n == 3) {
      numSteps = 2;
    }
    for (int step = 0; step < numSteps; ++step) {
      int i = -1;
      int j = -1;
      bool vertical = 0;
      for (int iteration = 0; ; ++iteration) {
        if (iteration == 1000) {
          ok = false;
          break;
        }
        bool fine = true;
        i = rand() % n;
        j = rand() % n;
        vertical = rand() % 2;
        if (vertical) {
          if (j + 1 >= n) {
            fine = false;
          }
          if (isalpha(a[i][j]) || isalpha(a[i][j + 1])) {
            fine = false;
          }
        } else {
          if (i + 1 >= n) {
            fine = false;
          }
          if (isalpha(a[i][j]) || isalpha(a[i + 1][j])) {
            fine = false;
          }
        }
        if (fine) {
          break;
        }
      }
      if (vertical) {
        a[i][j] = a[i][j + 1] = 'a' + step;
        v[i]++;
        h[j]++;
        h[j + 1]++;
        if (v[i] > 3 || h[j] > 3 || h[j + 1] > 3) {
          ok = false;
          break;
        }
      } else {
        a[i][j] = a[i + 1][j] = 'a' + step;
        v[i]++;
        v[i + 1]++;
        h[j]++;
        if (v[i] > 3 || v[i + 1] > 3 || h[j] > 3) {
          ok = false;
          break;
        }
      }
    }
    for (int i = 0; i < n; ++i) {
      if (h[i] != h[0] || v[i] != v[0]) {
        ok = false;
        continue;
      }
    }

    if (ok) {
      TMatrix result(n);

      for (int i = 0; i < n; ++ i) {
        for (int j = 0; j < n; ++j) {
          result[i].push_back(a[i][j]);
        }
      }
      return result;
    }
  }
}

void FillMatrix(int n, const TMatrix& mat) {
  for (int dx = 0; dx < mat.size(); ++dx) {
    for (int dy = 0; dy < mat.size(); ++dy) {
      a[n - 1 - dx][n - 1 - dy] = mat[dx][dy];
    }
  }
}

int main()
{
  int n;
  cin >> n;                        
  int initialN = n;
  vector<TMatrix> mat(10);
  for (int i = 3; i < 8; ++i) {
    mat[i] = Solve(i);
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      a[i][j] = '.';
    }
  }
  if (n <= 2) {
    cout << -1 << endl;
    return 0;
  }

  while (n >= 8) {
    FillMatrix(n, mat[4]);
    n -= 4;    
  }
  FillMatrix(n, mat[n]);
  
  for (int i = 0; i < initialN; ++i) {
    for (int j = 0; j < initialN; ++j) {
      printf("%c", a[i][j]);
    }
    cout << endl;
  }
    
  return 0;
}


Measured memory_bytes: 2176