#include <cmath>
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <list>
#include <time.h>
#include <math.h>
#include <random>
#include <deque>
#include <queue>
#include <cassert>
#include <unordered_map>
#include <unordered_set>
#include <iomanip>
#include <bitset>
#include <sstream>
#include <chrono>
#include <cstring>

using namespace std;

typedef long long ll;

#ifdef iq
  mt19937 rnd(228);
#else
  mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
#endif

bool vis[1000][1000];
int id[1000][1000];

int sz = 0;

int n;

int real_n;

char ans[1000][1000];

void func(int i, int j) {
  {
    set <int> t;
    for (int x = 0; x < i; x++) {
      set <int> q;
      for (int y = 0; y < n; y++) {
        if (vis[x][y]) {
          q.insert(id[x][y]);
        }
      }
      if (q.size() > 3) return;
      t.insert(q.size());
    }
    if (t.size() > 1) return;
  }
  if (j == n) {
    i++;
    j = 0;
  }
  if (i == n) {
    set <int> t;
    for (int x = 0; x < n; x++) {
      set <int> q;
      for (int y = 0; y < n; y++) {
        if (vis[x][y]) {
          q.insert(id[x][y]);
        }
      }
      t.insert(q.size());
    }
    for (int y = 0; y < n; y++) {
      set <int> q;
      for (int x = 0; x < n; x++) {
        if (vis[x][y]) {
          q.insert(id[x][y]);
        }
      }
      t.insert(q.size());
    }
    if (!*t.begin()) return;
    if (t.size() == 1) {
      if (*t.begin() == 3) {
        map <int, char> t;
        char cur = 'a';
        for (int i = 0; i < n; i++) {
          for (int j = 0; j < n; j++) {
            if (vis[i][j]) {
              if (!t.count(id[i][j])) {
                t[id[i][j]] = cur++;
              }
              ans[i][j] = t[id[i][j]];
            } else {
              ans[i][j] = '.';
            }
          }
        }
        while (n < real_n) {
          ans[n][n] = 'a';
          ans[n + 1][n] = 'a';
          ans[n][n + 1] = 'b';
          ans[n + 1][n + 1] = 'b';
          ans[n][n + 2] = 'c';
          ans[n][n + 3] = 'c';
          ans[n + 1][n + 2] = 'd';
          ans[n + 1][n + 3] = 'd';
          ans[n + 2][n + 2] = 'e';
          ans[n + 3][n + 2] = 'e';
          ans[n + 2][n + 3] = 'f';
          ans[n + 3][n + 3] = 'f';
          ans[n + 2][n + 0] = 'g';
          ans[n + 2][n + 1] = 'g';
          ans[n + 3][n + 0] = 'h';
          ans[n + 3][n + 1] = 'h';
          n += 4;
        }
        for (int i = 0; i < n; i++) {
          for (int j = 0; j < n; j++) {
            cout << ans[i][j];
          }
          cout << '\n';
        }
        exit(0);
      }
    }
    return;
  } else {
    if (i + 1 < n && !vis[i + 1][j] && !vis[i][j]) {
      sz++;
      vis[i][j] = 1;
      vis[i + 1][j] = 1;
      id[i][j] = sz;
      id[i + 1][j] = sz;
      func(i, j + 1);
      vis[i][j] = 0;
      vis[i + 1][j] = 0;
    }
    if (j + 1 < n && !vis[i][j] && !vis[i][j + 1]) {
      sz++;
      vis[i][j] = 1;
      vis[i][j + 1] = 1;
      id[i][j] = sz;
      id[i][j + 1] = sz;
      func(i, j + 1);
      vis[i][j] = 0;
      vis[i][j + 1] = 0;
    }
    func(i, j + 1);
  }
}

int main() {
#ifdef iq
  freopen("a.in", "r", stdin);
#endif
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) ans[i][j] = '.';
  real_n = n;
  if (n == 2) {
    cout << -1 << endl;
    return 0;
  }
  if (n == 3) {
    cout << "aab\n";
    cout << "c.b\n";
    cout << "cdd\n";
    return 0;
  }
  int its = 0;
  while (n - 4 >= 4) {
    n -= 4;
    its++;
  }
  func(0, 0);
}


Measured memory_bytes: 2304