#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef vector<vector<char>> matrix;
typedef long long ll;


int N;
matrix ans;


matrix make_m(int n) {
    matrix m(n, vector<char>(n, '.'));
    if (n == 3) {
        m[0][0] = m[0][1] = 'a';
        m[1][2] = m[2][2] = 'a';
    }
    else if (n == 4) {
        m[0][0] = m[0][1] = m[2][2] = m[2][3] = 'a';
        m[0][2] = m[1][2] = m[2][0] = m[3][0] = m[3][2] = m[3][3] = 'b';
        m[0][3] = m[1][0] = m[1][1] = m[1][3] = 'c';
        m[2][1] = m[3][1] = 'd';
    }
    else if (n == 5) {
        m[0][0] = m[0][1] = m[4][3] = m[4][4] = 'a';
        m[0][2] = m[0][3] = m[1][0] = m[2][0] = m[2][4] = m[3][4] = m[4][1] = m[4][2] = 'b';
        m[0][4] = m[1][1] = m[1][2] = m[1][4] = m[2][3] = m[3][0] = m[3][3] = m[4][0] = 'c';
    }
    else if (n == 6) {
        m[0][0] = m[0][1] = m[1][2] = m[1][3] = m[2][5] = m[3][5] = m[5][1] = m[5][2] = 'a';
        m[0][2] = m[0][3] = m[1][0] = m[2][0] = m[5][3] = m[5][4] = 'b';
        m[0][4] = m[0][5] = m[1][1] = m[2][1] = m[3][0] = m[4][0] = m[4][5] = m[5][5] = 'c';
        m[3][4] = m[4][4] = 'd';
    }
    else if (n == 7) {
        m[0][0] = m[0][1] = m[1][6] = m[2][6] = m[5][3] = m[5][4] = m[6][1] = m[6][2] = 'a';
        m[0][2] = m[0][3] = m[1][0] = m[2][0] = m[3][6] = m[4][6] = m[6][3] = m[6][4] = 'b';
        m[0][4] = m[0][5] = m[1][1] = m[1][2] = m[2][5] = m[3][0] = m[3][5] = m[4][0] = m[5][6] = m[6][6] = 'c';
        m[4][5] = m[5][5] = 'd';
    }
    return m;
}


int main() {
    cin >> N;
    if (N == 2) {
        cout << -1 << endl;
        return 0;
    }
    ans = matrix(N, vector<char>(N, '.'));
    if (N < 8) ans = make_m(N);
    else if (N % 4 == 0) {
        matrix m4 = make_m(4);
        rep(k, N / 4) {
            rep(i, 4) rep(j, 4) {
                ans[k*4+i][k*4+j] = m4[i][j];
            }
        }
    }
    else {
        matrix m4 = make_m(4);
        int x = 4 + (N % 4);
        matrix mx = make_m(x);
        rep(k, (N - x) / 4) {
            rep(i, 4) rep(j, 4) {
                ans[k*4+i][k*4+j] = m4[i][j];
            }
        }
        int k = N - x;
        rep(i, x) rep(j, x) {
            ans[k+i][k+j] = mx[i][j];
        }
    }
    rep(i, N) {
        rep(j, N) cout << ans[i][j];
        cout << endl;
    }
}

/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author
 */

#include <iostream>
#include <fstream>

#include <bits/stdc++.h>
using namespace std;

char piece[10][10][10];

bool DONE = false;

typedef pair<int, int> pii;

vector<pair<pii, pii>> placement[10];

int done[10][10];

vector<pair<pii, pii>> doms;

class CDominoQuality {
public:
  bool okrow(int n, int row) {
    if (row < 0) return true;
    int cnt = 0;
    for (int j = 0; j < n; j++) {
      if (!done[row][j]) continue;
      if (j == 0 || (done[row][j] != done[row][j - 1])) cnt++;
    }
    return cnt == 3;
  }

  bool okcol(int n, int col) {
    if (col < 0) return true;
    int cnt = 0;
    for (int i = 0; i < n; i++) {
      if (!done[i][col]) continue;
      if (i == 0 || (done[i][col] != done[i - 1][col])) cnt++;
    }
    return cnt == 3;
  }

  void dfs(int n, int p) {
    if (DONE) return;
    if (p % n == 0) {
      int row = p / n - 1;
      if (!okrow(n, row - 1)) return;
      if (p == n * n) {
        for (int i = 0; i < n; i++) {
          if (!okcol(n, i)) {
            return;
          }
        }
        placement[n] = doms;
        DONE = true;
        return;
      }
    }
    dfs(n, p + 1);
    int r = p / n, c = p % n;
    if (c < n - 1 && !done[r][c + 1] && !done[r][c]) {
      doms.push_back({{r, c}, {r, c + 1}});
      done[r][c + 1] = done[r][c] = p + 1;
      dfs(n, p + 1);
      done[r][c + 1] = done[r][c] = 0;
      doms.pop_back();
    }
    if (r < n - 1 && !done[r + 1][c] && !done[r][c]) {
      doms.push_back({{r, c}, {r + 1, c}});
      done[r + 1][c] = done[r][c] = p + 1;
      dfs(n, p + 1);
      done[r + 1][c] = done[r][c] = 0;
      doms.pop_back();
    }
  }

  void solve(std::istream& in, std::ostream& out) {
    int n;
    in >> n;
    if (n == 2) {
      out << -1 << endl;
      return;
    }
    if (n == 3) {
      out << "aa.\n";
      out << "..b\n";
      out << "..b\n";
      return;
    }
    memset(piece, '.', sizeof piece);
    for (int i = 4; i <= 7; i++) {
      DONE = false;
      dfs(i, 0);
      for (int j = 0; j < placement[i].size(); j++) {
        auto p = placement[i][j];
        int r1 = p.first.first, c1 = p.first.second, r2 = p.second.first, c2 = p.second.second;
        piece[i][r1][c1] = piece[i][r2][c2] = j + 'a';
      }
    }
    int rep = n / 4 - 1, left = n % 4 + 4;
    vector<vector<char>> res(n, vector<char>(n, '.'));
    for (int k = 0; k < rep; k++) {
      for (int i = 0; i < 4; i++) {
        for (int j = 0; j < 4; j++) {
          res[k * 4 + i][k * 4 + j] = piece[4][i][j];
        }
      }
    }
    for (int i = 0; i < left; i++) {
      for (int j = 0; j < left; j++) {
        res[rep * 4 + i][rep * 4 + j] = piece[left][i][j];
      }
    }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++)
      out << res[i][j];
      out << "\n";
    }
	}
};


int main() {
	CDominoQuality solver;
	std::istream& in(std::cin);
	std::ostream& out(std::cout);
	solver.solve(in, out);
	return 0;
}
