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

#include <iostream>
#include <fstream>

#include <bits/stdc++.h>

#define pb push_back
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(),(v).end()
#define mp make_pair

using namespace std;

typedef long long int64;
typedef vector<int> vi;
typedef pair<int, int> ii;

class taskc {
 public:
  void p4(vector<vector<char>>& res, int r) {
    res[r+0][r+0] = 'a';
    res[r+0][r+1] = 'b';
    res[r+0][r+2] = 'c';
    res[r+0][r+3] = 'c';
    res[r+1][r+0] = 'a';
    res[r+1][r+1] = 'b';
    res[r+1][r+2] = 'd';
    res[r+1][r+3] = 'd';
    res[r+2][r+0] = 'e';
    res[r+2][r+1] = 'e';
    res[r+2][r+2] = 'f';
    res[r+2][r+3] = 'g';
    res[r+3][r+0] = 'h';
    res[r+3][r+1] = 'h';
    res[r+3][r+2] = 'f';
    res[r+3][r+3] = 'g';
  }

  void p5(vector<vector<char>>& res, int r) {
    res[r+0][r+0] = 'a';
    res[r+0][r+1] = 'b';
    res[r+0][r+2] = 'c';
    res[r+1][r+0] = 'a';
    res[r+1][r+1] = 'b';
    res[r+1][r+2] = 'c';
    res[r+2][r+0] = 'd';
    res[r+2][r+1] = 'd';
    res[r+2][r+2] = 'e';
    res[r+2][r+3] = 'f';
    res[r+2][r+4] = 'f';
    res[r+3][r+0] = 'g';
    res[r+3][r+2] = 'e';
    res[r+3][r+3] = 'h';
    res[r+3][r+4] = 'h';
    res[r+4][r+0] = 'g';
    res[r+4][r+1] = 'i';
    res[r+4][r+2] = 'i';
    res[r+4][r+3] = 'j';
    res[r+4][r+4] = 'j';
  }

  void p6(vector<vector<char>>& res, int r) {
    res[r+0][r+0] = 'a';
    res[r+0][r+1] = 'a';
    res[r+0][r+4] = 'b';
    res[r+0][r+5] = 'c';
    res[r+1][r+0] = 'd';
    res[r+1][r+1] = 'd';
    res[r+1][r+4] = 'b';
    res[r+1][r+5] = 'c';
    res[r+2][r+0] = 'e';
    res[r+2][r+1] = 'f';
    res[r+2][r+2] = 'g';
    res[r+2][r+3] = 'g';
    res[r+3][r+0] = 'e';
    res[r+3][r+1] = 'f';
    res[r+3][r+2] = 'h';
    res[r+3][r+3] = 'h';
    res[r+4][r+2] = 'i';
    res[r+4][r+3] = 'j';
    res[r+4][r+4] = 'k';
    res[r+4][r+5] = 'k';
    res[r+5][r+2] = 'i';
    res[r+5][r+3] = 'j';
    res[r+5][r+4] = 'l';
    res[r+5][r+5] = 'l';
  }

  void p7(vector<vector<char>>& res, int r) {
    res[r+0][r+0] = 'a';
    res[r+0][r+1] = 'a';
    res[r+0][r+2] = 'b';
    res[r+0][r+3] = 'b';
    res[r+1][r+0] = 'c';
    res[r+1][r+1] = 'c';
    res[r+1][r+2] = 'd';
    res[r+1][r+3] = 'd';
    res[r+2][r+0] = 'e';
    res[r+2][r+1] = 'e';
    res[r+2][r+2] = 'f';
    res[r+2][r+3] = 'f';
    res[r+3][r+4] = 'g';
    res[r+3][r+5] = 'h';
    res[r+3][r+6] = 'i';
    res[r+4][r+4] = 'g';
    res[r+4][r+5] = 'h';
    res[r+4][r+6] = 'i';
    res[r+5][r+4] = 'j';
    res[r+5][r+5] = 'k';
    res[r+5][r+6] = 'l';
    res[r+6][r+4] = 'j';
    res[r+6][r+5] = 'k';
    res[r+6][r+6] = 'l';
    res[r+0][r+5] = 'm';
    res[r+0][r+6] = 'm';
    res[r+1][r+4] = 'n';
    res[r+2][r+4] = 'n';
  }

  void solve(std::istream &in, std::ostream &out) {
    int n;
    in >> n;
    if (n == 1 || n == 2) {
      out << -1 << endl;
      return;
    }
    if (n == 3) {
      out << "aa.\n";
      out << "..a\n";
      out << "..a\n";
      return;
    }
    int base = (n - 4) % 4 + 4;
    vector<vector<char>> res(n, vector<char>(n, '.'));
    switch (base) {
      case 4:
        p4(res, 0);
        break;
      case 5:
        p5(res, 0);
        break;
      case 6:
        p6(res, 0);
        break;
      case 7:
        p7(res, 0);
        break;
    }
    for (int i = base; i < n; i += 4) {
      p4(res, i);
    }
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < n; ++j) out << res[i][j];
      out << "\n";
    }
  }
};


int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  taskc solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}


Measured memory_bytes: 2304