#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <tuple>
#include <iomanip>
#include <climits>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
//typedef pair<ll, ll> P;
#define rep(i, n) for(ll i = 0; i < (n); i++)
#define revrep(i, n) for(ll i = (n)-1; i >= 0; i--)
#define pb push_back
#define f first
#define s second
#define chmin(x, y) x = min(x, y);
#define chmax(x, y) x = max(x, y);

//const ll INFL = LLONG_MAX;//10^18 = 2^60
const ll INFL = 1LL<<60;
//const int INF = INT_MAX;
const ll INF = 1 << 30;//10^9
ll MOD = 1000000007;
//ll MOD = 998244353;

vector<ll> dy = {0, 1, 0, -1, 1, 1, -1, -1, 0};
vector<ll> dx = {1, 0, -1, 0, 1, -1, 1, -1, 0};

void pres(double A, ll x = 10){cout << fixed << setprecision(x) << A << endl;}
void BinarySay(ll x, ll y = 60){rep(i, y) cout << (x>>(y-1-i) & 1); cout << endl;}
ll cnt_bit(ll x){return __builtin_popcountll(x);}

ll pow_long(ll x, ll k){
  ll res = 1;
  while(k > 0){
    if(k % 2) res *= x;
    x *= x; k /= 2;
  }
  return res;
}

ll pow_mod(ll x, ll k){
  ll res = 1;
  while(k > 0){
    if(k % 2){
      res *= x; res %= MOD;
    }
    x *= x; x %= MOD;
    k /= 2;
  }
  return res;
}

ll inverse(ll x){return pow_mod(x, MOD - 2);};

ll gcd(ll a, ll b){
    if(b == 0) return a;
    return gcd(b, a % b);
}

ll lcm(ll x, ll y){return x / gcd(x, y) * y;};

//コンビネーション
const int MAXcomb = 200010;
ll fac[MAXcomb], finv[MAXcomb], inv[MAXcomb];
//facはn!,finvは1/n!
//invは逆元
void COMinit(){
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for(int i = 2; i < MAXcomb; i++){
        fac[i] = fac[i-1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD/i) % MOD;
        finv[i] = finv[i-1] * inv[i] % MOD;
    }
}
ll comb(int n, int k){
    if(n < k) return 0;
    if(n < 0 || k < 0) return 0;
    return fac[n] * finv[k] % MOD * finv[n-k] % MOD;
}

char a_4[4][4];
char a_5[5][5];
char a_6[6][6];
char a_7[7][7];

void make_4(){
  a_4[0][0] = 'a', a_4[0][1] = 'b', a_4[0][2] = 'c', a_4[0][3] = 'c';
  a_4[1][0] = 'a', a_4[1][1] = 'b', a_4[1][2] = 'd', a_4[1][3] = 'd';
  a_4[2][0] = 'c', a_4[2][1] = 'c', a_4[2][2] = 'a', a_4[2][3] = 'b';
  a_4[3][0] = 'd', a_4[3][1] = 'd', a_4[3][2] = 'a', a_4[3][3] = 'b';
}

void make_5(){
  a_5[0][0] = 'a', a_5[0][1] = 'a', a_5[0][2] = 'b', a_5[0][3] = 'b', a_5[0][4] = 'c';
  a_5[1][0] = 'h', a_5[1][1] = '.', a_5[1][2] = 'i', a_5[1][3] = 'i', a_5[1][4] = 'c';
  a_5[2][0] = 'h', a_5[2][1] = 'j', a_5[2][2] = '.', a_5[2][3] = '.', a_5[2][4] = 'd';
  a_5[3][0] = 'g', a_5[3][1] = 'j', a_5[3][2] = '.', a_5[3][3] = '.', a_5[3][4] = 'd';
  a_5[4][0] = 'g', a_5[4][1] = 'f', a_5[4][2] = 'f', a_5[4][3] = 'e', a_5[4][4] = 'e';
}

void make_6(){
  a_6[0][0] = 'a', a_6[0][1] = 'a', a_6[0][2] = 'b', a_6[0][3] = 'b', a_6[0][4] = '.', a_6[0][5] = 'c';
  a_6[1][0] = '.', a_6[1][1] = 'i', a_6[1][2] = 'i', a_6[1][3] = '.', a_6[1][4] = 'j', a_6[1][5] = 'c';
  a_6[2][0] = 'h', a_6[2][1] = '.', a_6[2][2] = '.', a_6[2][3] = '.', a_6[2][4] = 'j', a_6[2][5] = 'd';
  a_6[3][0] = 'h', a_6[3][1] = 'l', a_6[3][2] = '.', a_6[3][3] = '.', a_6[3][4] = '.', a_6[3][5] = 'd';
  a_6[4][0] = 'g', a_6[4][1] = 'l', a_6[4][2] = '.', a_6[4][3] = 'k', a_6[4][4] = 'k', a_6[4][5] = '.';
  a_6[5][0] = 'g', a_6[5][1] = '.', a_6[5][2] = 'f', a_6[5][3] = 'f', a_6[5][4] = 'e', a_6[5][5] = 'e';
}

void make_7(){
  a_7[0][0] = 'l', a_7[0][1] = 'l', a_7[0][2] = '.', a_7[0][3] = 'a', a_7[0][4] = 'a', a_7[0][5] = 'i', a_7[0][6] = 'i';
  a_7[1][0] = 'h', a_7[1][1] = 'b', a_7[1][2] = 'f', a_7[1][3] = '.', a_7[1][4] = '.', a_7[1][5] = '.', a_7[1][6] = '.';
  a_7[2][0] = 'h', a_7[2][1] = 'b', a_7[2][2] = 'f', a_7[2][3] = '.', a_7[2][4] = '.', a_7[2][5] = '.', a_7[2][6] = '.';
  a_7[3][0] = '.', a_7[3][1] = '.', a_7[3][2] = 'm', a_7[3][3] = 'm', a_7[3][4] = 'd', a_7[3][5] = 'd', a_7[3][6] = 'c';
  a_7[4][0] = '.', a_7[4][1] = 'g', a_7[4][2] = 'g', a_7[4][3] = '.', a_7[4][4] = 'j', a_7[4][5] = 'j', a_7[4][6] = 'c';
  a_7[5][0] = 'e', a_7[5][1] = '.', a_7[5][2] = '.', a_7[5][3] = 'k', a_7[5][4] = '.', a_7[5][5] = '.', a_7[5][6] = 'n';
  a_7[6][0] = 'e', a_7[6][1] = '.', a_7[6][2] = '.', a_7[6][3] = 'k', a_7[6][4] = '.', a_7[6][5] = '.', a_7[6][6] = 'n';
}

void solve(){
  ll N;
  cin >> N;
  if(N == 2){
    cout << -1 << endl;
    return;
  }
  if(N == 3){
    cout << ".aa" << endl;
    cout << "a.." << endl;
    cout << "a.." << endl;
    return;
  }

  make_4();
  make_5();
  make_6();
  make_7();

  ll x = (N-4) / 4;
  ll y = N - x * 4;
  char ans[N][N];
  rep(i, N)rep(j, N) ans[i][j] = '.';
  rep(t, x){
    rep(i, 4)rep(j, 4){
      ans[t*4 + i][t * 4 + j] = a_4[i][j];
    }
  }
  if(y == 4){
    rep(i, 4)rep(j, 4) ans[4*x+i][4*x+j] = a_4[i][j];
  }else if(y == 5){
    rep(i, 5)rep(j, 5) ans[4*x+i][4*x+j] = a_5[i][j];
  }else if(y == 6){
    rep(i, 6)rep(j, 6) ans[4*x+i][4*x+j] = a_6[i][j];
  }else{
    rep(i, 7)rep(j, 7) ans[4*x+i][4*x+j] = a_7[i][j];
  }

  rep(i, N){
    rep(j, N){
      cout << ans[i][j];
    }
    cout << endl;
  }


}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  solve();
}


Measured memory_bytes: 2176