#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <random>
#include <chrono>
#include <tuple>
#include <random>

using namespace std;

typedef long long ll;
typedef long double ld;
#define fastInp cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);

const ll SIZE = 1e6 * 2 + 10, INF = 1e9 * 1e9 + 10;

char grid[1002][1002];

int main()
{
    fastInp;
    ll n;
    cin >> n;
    if (n == 2) {
        cout << "-1";
        return 0;
    }

    if (n == 3) {
        cout << "aa.\n..b\n..b";
        return 0;
    }

    if (n == 6) {
        cout << "aa....\n";
        cout << "..b...\n";
        cout << "..b...\n";
        cout << "...aa.\n";
        cout << ".....b\n";
        cout << ".....b\n";
        return 0;
    }

    if (n == 7) {
        cout << ".aabbcc\n";
        cout << "d.eett.\n";
        cout << "dc....k\n";
        cout << "rc....k\n";
        cout << "rf....d\n";
        cout << "kf....d\n";
        cout << "k.aabb.\n";
        return 0;
    }

    if (n == 11) {
        cout << "laabbccddee\n";
        cout << "lmmrqqx...z\n";
        cout << "hf.rs.x...z\n";
        cout << "hfjjsmm...x\n";
        cout << "g...tkkdllx\n";
        cout << "g...t.fd.hy\n";
        cout << "f...eefrrhy\n";
        cout << "fbgg...vuut\n";
        cout << "ab.q...v.pt\n";
        cout << "awwq...sspu\n";
        cout << "ddccbbooiiu\n";
        return 0;
    }

    for (int i = 0; i <= n; i++) {
        if (4 * i <= n) {
            ll left = n - 4 * i;
            if (left % 5 == 0) {
                ll i2 = left / 5, prevX = 0;
                for (int j = 0; j < i; j++) {
                    grid[prevX][prevX] = 'a'; grid[prevX + 1][prevX] = 'a'; grid[prevX + 2][prevX] = 'b'; grid[prevX + 3][prevX] = 'c';
                    grid[prevX][prevX + 1] = 'd'; grid[prevX + 1][prevX + 1] = 'd'; grid[prevX + 2][prevX + 1] = 'b'; grid[prevX + 3][prevX + 1] = 'c';
                    grid[prevX][prevX + 2] = 'a'; grid[prevX + 1][prevX + 2] = 'b'; grid[prevX + 2][prevX + 2] = 'y'; grid[prevX + 3][prevX + 2] = 'y';
                    grid[prevX][prevX + 3] = 'a'; grid[prevX + 1][prevX + 3] = 'b'; grid[prevX + 2][prevX + 3] = 'x'; grid[prevX + 3][prevX + 3] = 'x';
                    prevX += 4;
                }

                for (int j = 0; j < i2; j++) {
                    grid[prevX][prevX] = 'a'; grid[prevX + 1][prevX] = 'a'; grid[prevX + 2][prevX] = 'b'; grid[prevX + 3][prevX] = 'b'; grid[prevX + 4][prevX] = 'c';
                    grid[prevX][prevX + 1] = 'd'; grid[prevX + 1][prevX + 1] = '.'; grid[prevX + 2][prevX + 1] = 'f'; grid[prevX + 3][prevX + 1] = 'f'; grid[prevX + 4][prevX + 1] = 'c';
                    grid[prevX][prevX + 2] = 'd'; grid[prevX + 1][prevX + 2] = 'r'; grid[prevX + 2][prevX + 2] = '.'; grid[prevX + 3][prevX + 2] = '.'; grid[prevX + 4][prevX + 2] = 'z';
                    grid[prevX][prevX + 3] = 't'; grid[prevX + 1][prevX + 3] = 'r'; grid[prevX + 2][prevX + 3] = '.'; grid[prevX + 3][prevX + 3] = '.'; grid[prevX + 4][prevX + 3] = 'z';
                    grid[prevX][prevX + 4] = 't'; grid[prevX + 1][prevX + 4] = 'k'; grid[prevX + 2][prevX + 4] = 'k'; grid[prevX + 3][prevX + 4] = 'y'; grid[prevX + 4][prevX + 4] = 'y';
                    prevX += 5;
                }

                for (int i= 0; i < n; i++) {
                    for (int j = 0; j < n; j++) {
                        if (grid[i][j] == 0) grid[i][j] = '.';
                        cout << grid[i][j];
                    }
                    cout << "\n";
                }
                return 0;
            }
        }
    }

    return 0;
}
/**
 * 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;
}
