#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a;
  cin >> a;
  if(a == 2){cout << -1 << endl;}
  else if(a == 3){cout << "aa." <<endl;
                 cout << "..a" <<endl;
                 cout << "..a" <<endl;}
  else{
    int c;
    c = (a/4-1)*4;
    for(int i = 0;i < c/2;i++){
      for(int j = 0;j < c;j++){
      if(j/2==i){cout << 'a';}
      else if(j==c-2*i-2){cout << 'c';}
      else if(j==c-2*i-1){cout << 'd';}
        else{cout << '.';}
      }
      for(int j = 0;j < a-c;j++){
        cout << '.';}
      cout << endl;
      for(int j = 0;j < c;j++){
      if(j/2==i){cout << 'b';}
      else if(j==c-2*i-2){cout << 'c';}
      else if(j==c-2*i-1){cout << 'd';}
        else{cout << '.';}
      }
      for(int j = 0;j < a-c;j++){
        cout << '.';}
       cout << endl;
    }
    int p = a-c;
    if(p == 4){
      for(int i = 0;i < c;i++){cout << '.';}
      cout << "aabc" << endl;
      for(int i = 0;i < c;i++){cout << '.';}
      cout << "ddbc" << endl;
      for(int i = 0;i < c;i++){cout << '.';}
      cout << "bcaa" << endl;
       for(int i = 0;i < c;i++){cout << '.';}
      cout << "bcdd" << endl;}
    else if(p == 5){
      for(int i = 0;i < c;i++){cout << '.';}cout << "aabbc" << endl;
      for(int i = 0;i < c;i++){cout << '.';}cout << "de..c" << endl;
      for(int i = 0;i < c;i++){cout << '.';}cout << "de..f" << endl;
      for(int i = 0;i < c;i++){cout << '.';}cout << "h.ggf" << endl;
      for(int i = 0;i < c;i++){cout << '.';}cout << "hiijj" << endl;}
    else if(p==6){
      for(int i = 0;i < c;i++){cout << '.';}cout << "aabxx." << endl;
      for(int i = 0;i < c;i++){cout << '.';}cout << "c.b..z" << endl;
      for(int i = 0;i < c;i++){cout << '.';}cout << "cdd..z" << endl;
      for(int i = 0;i < c;i++){cout << '.';}cout << "xx.aab" << endl;
      for(int i = 0;i < c;i++){cout << '.';}cout << "..zc.b" << endl;
      for(int i = 0;i < c;i++){cout << '.';}cout << "..zcdd" << endl;}
    else{
      for(int i = 0;i < c;i++){cout << '.';}cout << "aa.bb.c" << endl;
      for(int i = 0;i < c;i++){cout << '.';}cout << ".d..eec" << endl;
      for(int i = 0;i < c;i++){cout << '.';}cout << "fdg...." << endl;
      for(int i = 0;i < c;i++){cout << '.';}cout << "f.g...h" << endl;
      for(int i = 0;i < c;i++){cout << '.';}cout << "...iijh" << endl;
      for(int i = 0;i < c;i++){cout << '.';}cout << "zxx..j." << endl;
      for(int i = 0;i < c;i++){cout << '.';}cout << "z.mm.nn" << endl;}
  }
}
#include<stdio.h>
#include<algorithm>
#include<vector>
#define fst first
#define snd second

using namespace std;

typedef pair<int, int> pii;
typedef long long ll;

char three[3][4] = {
    "xx.",
    "..y",
    "..y"
};

char four[4][5] = {
    "aacd",
    "bbcd",
    "cdaa",
    "cdbb"
};

char five[5][6] = {
    "aabbc",
    "dx..c",
    "dx..b",
    "a.yyb",
    "accdd"
};

char six[6][7] = {
    "aacd..",
    "bbcd..",
    "..aacd",
    "..bbcd",
    "cd..aa",
    "cd..bb"
};

char seven[7][8] = {
    "aabbcc.",
    "xx.xx.a",
    "..y..ya",
    "..y..yb",
    "xx.xx.b",
    "..y..yc",
    "..y..yc"
};

char ans[1000][1000 + 1];

int main() {
    int n;
    scanf("%d", &n);
    if (n == 2) return !puts("-1");
    if (n == 3) {
        for(int i = 0; i < 3; i++)
            puts(three[i]);
    }
    else {
        for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) ans[i][j] = '.';

        for(int st = 0; st < n;) {
            if (n - st == 5) {
                for (int i = 0; i < 5; i++) for (int j =0; j < 5; j++) {
                    ans[st + i][st + j] = five[i][j];
                }
                st += 5;
            }
            else if (n - st == 6) {
                for (int i = 0; i < 6; i++) for (int j = 0; j < 6; j++) {
                    ans[st + i][st + j] = six[i][j];
                }
                st += 6;
            }
            else if (n - st == 7) {
                for (int i = 0; i < 7; i++) for (int j = 0; j < 7; j++) {
                    ans[st + i][st + j] = seven[i][j];
                }
                st += 7;
            }
            else {
                for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) {
                    ans[st + i][st + j] = four[i][j];
                }
                st += 4;
            }
        }
        
        for (int i = 0; i < n; i++)
            puts(ans[i]);
    }
    return 0;
}