#ifdef DEBUG
#define _GLIBCXX_DEBUG
#endif

#include <bits/stdc++.h>

using namespace std;

typedef long double ld;

#ifdef DEBUG
#define eprintf(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
#else
#define eprintf(...) ;
#endif

#define sz(x) ((int) (x).size())
#define TASK "text"

const int inf = (int) 1.01e9;
const long long infll = (long long) 1.01e18;
const ld eps = 1e-9;
const ld pi = acos((ld) -1);

#ifdef DEBUG
mt19937 mrand(300); 
#else
mt19937 mrand(chrono::steady_clock::now().time_since_epoch().count()); 
#endif

int rnd(int x) {
  return mrand() % x;
}

char a5[5][6] = {"..abc", "..abc", "ddeef", "ggh.f", "iihjj"};

int n;

int rs[100], cs[100];
char a[100][100];

bool rec(int x, int y, char cur) {
  if (x >= n) {
    bool ok = true;
    for (int i = 0; i < n; i++) {
      if (!(rs[i] == 3 && cs[i] == 3)) {
        ok = false;
        break;
      }
    }
    return ok;
  }
  if (y >= n) {
    return rec(x + 1, 0, cur);
  }
  if (y + 1 < n && a[x][y] == '.' && a[x][y + 1] == '.' && rs[x] < 3 && cs[y] < 3 && cs[y + 1] < 3) {
    a[x][y] = cur;
    a[x][y + 1] = cur;
    rs[x]++;
    cs[y]++;
    cs[y + 1]++;
    if (rec(x, y + 1, cur + 1)) {
      return true;
    }
    a[x][y] = '.';
    a[x][y + 1] = '.';
    rs[x]--;
    cs[y]--;
    cs[y + 1]--;
  }
  if (x + 1 < n && a[x][y] == '.' && a[x + 1][y] == '.' && rs[x] < 3 && cs[y] < 3 && rs[x + 1] < 3) {
    a[x][y] = cur;
    a[x + 1][y] = cur;
    rs[x]++;
    cs[y]++;
    rs[x + 1]++;
    if (rec(x, y + 1, cur + 1)) {
      return true;
    }
    a[x][y] = '.';
    a[x + 1][y] = '.';
    rs[x]--;
    cs[y]--;
    rs[x + 1]--;
  }
  if (rec(x, y + 1, cur)) {
    return true;
  }
  return false;
}

void precalc() {
  n = 7;
  for (int i = 0; i < n; i++) {
    rs[i] = 0;
    cs[i] = 0;
    for (int j = 0; j < n; j++) {
      a[i][j] = '.';
    }
  }
  rec(0, 0, 'a');
}


bool read() {
  if (scanf("%d", &n) < 1) {
    return false;
  }
  return true;
}

const int maxn = 1005;
char c[maxn][maxn];

void draw3(int p) {
  c[p][p] = 'a';
  c[p][p + 1] = 'a';
  c[p][p + 2] = 'b';
  c[p + 1][p + 2] = 'b';
  c[p + 2][p + 2] = 'c';
  c[p + 2][p + 1] = 'c';
  c[p + 2][p] = 'd';
  c[p + 1][p] = 'd';
}

void draw4(int p) {
  for (int i = 0; i < 2; i++) {
    int q = p + 2 * i;
    c[q][q] = 'a';
    c[q][q + 1] = 'a';
    c[q + 1][q] = 'b';
    c[q + 1][q + 1] = 'b';
  }
  for (int i = 0; i < 2; i++) {
    int x = p + 2 * i, y = p + 2 - 2 * i;
    c[x][y] = 'c';
    c[x + 1][y] = 'c';
    c[x][y + 1] = 'd';
    c[x + 1][y + 1] = 'd';
  }
}

void draw5(int p) {
  for (int i = 0; i < 5; i++) {
    for (int j = 0; j < 5; j++) {
      c[p + i][p + j] = a5[i][j];
    }
  }
}

void draw7(int p) {
  for (int i = 0; i < 7; i++) {
    for (int j = 0; j < 7; j++) {
      c[p + i][p + j] = a[i][j];
    }
  }
}

void draw6(int p) {
  char cur = 'a';
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j < 3; j++) {
      c[p + 2 * i][p + i + 2 * j] = cur;
      c[p + 2 * i + 1][p + i + 2 * j] = cur;
      cur++;
    }
  }
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j < 3; j++) {
      c[p + 4 + i][p + 2 * j] = cur;
      c[p + 4 + i][p + 2 * j + 1] = cur;
      cur++;
    }
  }
}

void printAns() {
  for (int i = 0; i < n; i++) {
    c[i][n] = 0;
    printf("%s\n", c[i]);
  }
}

void solve() {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      c[i][j] = '.';
    }
  }
  if (n <= 2) {
    printf("-1\n");
    return;
  }
  if (n == 3) {
    draw3(0);
    printAns();
    return;
  }
  int x = n;
  if (x & 1) {
    if (x == 7) {
      x -= 7;
      draw7(x);
    } else {
      x -= 5;
      draw5(x);
    }
  }
  while (x > 6) {
    x -= 4;
    draw4(x);
  }
  if (x == 6) {
    draw6(0);
  } else if (x == 4) {
    draw4(0);
  }
  printAns();
}

int main() {
  precalc();
#ifdef DEBUG
  assert(freopen(TASK ".in", "r", stdin));
  assert(freopen(TASK ".out", "w", stdout));
#endif
  while (read()) {
    solve();
#ifdef DEBUG
    eprintf("Time %.2f\n", (double) clock() / CLOCKS_PER_SEC);
#endif
  }
  return 0;
}


Measured memory_bytes: 2176