#include<cstdio>
#define For(i,A,B) for(i=A;i<=(B);++i)
char a[1005][1005];
void work(int x,int k){
	if(k==4){
		a[x][x]=a[x][x+1]=a[x][x+3]=a[x+1][x+3]=a[x+2][x]=a[x+3][x]=a[x+3][x+2]=a[x+3][x+3]='a';
		a[x+1][x]=a[x+1][x+1]=a[x+2][x+2]=a[x+2][x+3]='b';
		a[x][x+2]=a[x+1][x+2]=a[x+2][x+1]=a[x+3][x+1]='c';
	}else if(k==5){
		a[x][x]=a[x][x+1]=a[x][x+4]=a[x+1][x+4]=a[x+3][x]=a[x+4][x]=a[x+4][x+3]=a[x+4][x+4]='a';
		a[x][x+2]=a[x][x+3]=a[x+1][x]=a[x+2][x]=a[x+2][x+4]=a[x+3][x+4]=a[x+4][x+1]=a[x+4][x+2]='b';
		a[x+1][x+1]=a[x+1][x+2]=a[x+2][x+3]=a[x+3][x+3]='c';
	}else if(k==6){
		a[x][x]=a[x][x+1]=a[x][x+3]=a[x+1][x+3]=a[x+2][x+5]=a[x+3][x+2]=a[x+3][x+3]=a[x+3][x+5]=a[x+4][x]=a[x+5][x]=a[x+5][x+4]=a[x+5][x+5]='a';
		a[x+1][x]=a[x+1][x+1]=a[x+2][x+2]=a[x+2][x+3]=a[x+4][x+1]=a[x+4][x+4]=a[x+4][x+5]=a[x+5][x+1]='b';
		a[x][x+2]=a[x+1][x+2]=a[x+2][x+4]=a[x+3][x+4]='c';
	}else{
		a[x][x]=a[x][x+1]=a[x][x+6]=a[x+1][x+6]=a[x+2][x+2]=a[x+2][x+3]=a[x+3][x+4]=a[x+4][x+4]=a[x+5][x]=a[x+6][x]=a[x+6][x+5]=a[x+6][x+6]='a';
		a[x][x+2]=a[x][x+3]=a[x+2][x+6]=a[x+3][x]=a[x+3][x+6]=a[x+4][x]=a[x+6][x+3]=a[x+6][x+4]='b';
		a[x+1][x+1]=a[x+1][x+2]=a[x+1][x+5]=a[x+2][x+5]=a[x+4][x+1]=a[x+5][x+1]=a[x+5][x+4]=a[x+5][x+5]='c';
	}
}
int main(){
	int n,i,j;
	scanf("%d",&n);
	if(n==2)puts("-1");
	else if(n==3)puts("aa.\n..a\n..a");
	else{
		For(i,1,n)
			For(j,1,n)a[i][j]='.';
		For(i,0,(n>>2)-2)work((i<<2)+1,4);
		i=(n&3)+4;
		work(n-i+1,i);
		For(i,1,n)puts(a[i]+1);
	}
	return 0;
}
#include <bits/stdc++.h>
using namespace std;

int main() {
  int n;
  cin >> n;
  if (n == 2) {
    cout << -1 << endl;
    return 0;
  }
  if (n % 3 == 0) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (i % 3 == 0 && j % 3 < 2) {
          cout << 'a';
        } else if (i % 3 < 2 && j % 3 == 2) {
          cout << 'b';
        } else if (i % 3 == 2 && j % 3 > 0) {
          cout << 'c';
        } else if (i % 3 > 0 && j % 3 == 0) {
          cout << 'd';
        } else {
          cout << '.';
        }
      }
      cout << endl;
    }
    return 0;
  }
  if (n % 4 == 0) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (i / 2 % 2 == j / 2 % 2) {
          if (i % 2 == 0) {
            cout << 'a';
          } else {
            cout << 'b';
          }
        } else {
          if (j % 2 == 0) {
            cout << 'c';
          } else {
            cout << 'd';
          }
        }
      }
      cout << endl;
    }
    return 0;
  }
  if (n % 2 == 0) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (i / 2 + j / 2 == n / 2 - 1) {
          cout << '.';
        } else if ((i / 2 % 2 == j / 2 % 2) == (i / 2 + j / 2 < n / 2 - 1)) {
          if (i % 2 == 0) {
            cout << 'a';
          } else {
            cout << 'b';
          }
        } else {
          if (j % 2 == 0) {
            cout << 'c';
          } else {
            cout << 'd';
          }
        }
      }
      cout << endl;
    }
    return 0;
  }
  if (n % 4 == 1) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (i >= n - 3 && j >= n - 3) {
          int ni = n - 1 - i, nj = n - 1 - j;
          if (ni % 3 == 0 && nj % 3 < 2) {
            cout << 'a';
          } else if (ni % 3 < 2 && nj % 3 == 2) {
            cout << 'b';
          } else if (ni % 3 == 2 && nj % 3 > 0) {
            cout << 'c';
          } else if (ni % 3 > 0 && nj % 3 == 0) {
            cout << 'd';
          } else {
            cout << '.';
          }
        } else if (n - 5 <= i && i < n - 3 && n - 5 <= j && j < n - 3) {
          cout << '.';
        } else if (i >= n - 3 && j >= n - 5) {
          cout << (char) ('e' + ((n - j) / 2 + i) % 3);
        } else if (i >= n - 5 && j >= n - 3) {
          cout << (char) ('e' + ((n - i) / 2 + j) % 3);
        } else {
          if (i / 4 - j / 4) {
            cout << '.';
          } else if (i / 2 % 2 == j / 2 % 2) {
            if (i % 2 == 0) {
              cout << 'a';
            } else {
              cout << 'b';
            }
          } else {
            if (j % 2 == 0) {
              cout << 'c';
            } else {
              cout << 'd';
            }
          }
        }
      }
      cout << endl;
    }
    return 0;
  }
  if (n % 4 == 3) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (i >= n - 3 && j >= n - 3) {
          int ni = n - 1 - i, nj = n - 1 - j;
          if (ni % 3 == 0 && nj % 3 > 0) {
            cout << 'a';
          } else if (ni % 3 > 0 && nj % 3 == 0) {
            cout << 'b';
          } else {
            cout << '.';
          }
        } else if (n - 7 <= i && i < n - 3 && n - 7 <= j && j < n - 3) {
          cout << '.';
        } else if (i >= n - 3 && j >= n - 7) {
          cout << (char) ('e' + ((n - j) / 2 + i) % 3);
        } else if (i >= n - 7 && j >= n - 3) {
          cout << (char) ('e' + ((n - i) / 2 + j) % 3);
        } else {
          if (i / 4 - j / 4) {
            cout << '.';
          } else if (i / 2 % 2 == j / 2 % 2) {
            if (i % 2 == 0) {
              cout << 'a';
            } else {
              cout << 'b';
            }
          } else {
            if (j % 2 == 0) {
              cout << 'c';
            } else {
              cout << 'd';
            }
          }
        }
      }
      cout << endl;
    }
    return 0;
  }
}
