#include <bits/stdc++.h>
using namespace std;


void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}

template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif

#define rep(i, n)    for(int i = 0; i < (n); ++i)
#define repA(i, a, n)  for(int i = a; i <= (n); ++i)
#define repD(i, a, n)  for(int i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
#define all(x) x.begin(), x.end()
#define sz(x) (int)(x).size()
#define fill(a)  memset(a, 0, sizeof (a))
#define fst first
#define snd second
#define mp make_pair
#define pb push_back
typedef long double ld;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;

void pre(){


}

void solve(){


}
char ans[10][10][10];
char fns[1009][1009];
int cnt[10];
int gg;
void f(int x,int y,int x2,int y2){
	ans[gg][x][y] = ans[gg][x2][y2] = 'a'+cnt[gg];
	cnt[gg]++;
}
int main() {
	cin.sync_with_stdio(0); cin.tie(0);
	cin.exceptions(cin.failbit);
	pre();
	int n;cin>>n;
	rep(i,10) rep(j,10) rep(k,10) ans[i][j][k] = '.';
	ans[3][0][0] = ans[3][0][1] = 'a';
	ans[3][1][0] = ans[3][2][0] = 'b';
	ans[3][0][2] = ans[3][1][2] = 'c';
	ans[3][2][1] = ans[3][2][2] = 'd';
	ans[4][0][0] = ans[4][0][1] = 'a';
	ans[4][1][0] = ans[4][1][1] = 'b';
	ans[4][3][2] = ans[4][3][3] = 'c';
	ans[4][2][2] = ans[4][2][3] = 'd';
	ans[4][0][2] = ans[4][1][2] = 'e';
	ans[4][0][3] = ans[4][1][3] = 'f';
	ans[4][2][1] = ans[4][3][1] = 'g';
	ans[4][2][0] = ans[4][3][0] = 'h';
	ans[5][0][0] = ans[5][0][1] = 'a';
	ans[5][0][2] = ans[5][0][3] = 'b';
	ans[5][1][0] = ans[5][2][0] = 'c';
	ans[5][4][0] = ans[5][3][0] = 'd';
	ans[5][4][2] = ans[5][4][1] = 'e';
	ans[5][4][4] = ans[5][4][3] = 'f';
	ans[5][1][4] = ans[5][0][4] = 'g';
	ans[5][2][4] = ans[5][3][4] = 'h';
	ans[5][1][1] = ans[5][2][1] = 'i';
	ans[5][3][2] = ans[5][3][3] = 'j';
	gg=7;
	f(0,1,0,0);
	f(1,1,1,2);
	f(0,4,1,4);f(0,6,1,6);
	f(2,0,2,1);f(2,2,2,3);
	f(2,5,3,5);
	f(3,3,3,4);f(3,6,4,6);
	f(4,5,4,4);
	f(4,3,5,3);
	f(6,0,5,0);
	f(6,2,5,2);
	f(6,5,6,6);
	rep(i,n) rep(j,n) fns[i][j] = '.';
	if(n==2) cout<<-1;
	else if(n==3){
		rep(i,3) {
			rep(j,3) cout<<ans[3][i][j];
			cout<<'\n';
		}
	}
	else if(n==6){
		rep(i,3) rep(j,3) fns[i][j] = ans[3][i][j];
		repA(i,3,5) repA(j,3,5) fns[i][j]=ans[3][i-3][j-3];
		rep(i,n){
			rep(j,n) cout<<fns[i][j];
			cout<<'\n';
		}
	}
	else {
		int st = 0;
		if(n%4==1){
			rep(i,5) rep(j,5) fns[i][j] = ans[5][i][j];
			st=5;
		}
		else if(n%4==3){
			rep(i,7) rep(j,7) fns[i][j] = ans[7][i][j];
			st=7;
		}
		if(n%4==2){
			rep(i,5) rep(j,5) fns[i][j] = ans[5][i][j];
			repA(i,5,9) repA(j,5,9) fns[i][j]=ans[5][i-5][j-5];
			st=10;	
		}
		while(st<n){
			repA(i,st,st+3) repA(j,st,st+3) fns[i][j] = ans[4][i-st][j-st];
			st+=4;
		}
		rep(i,n){
			rep(j,n) cout<<fns[i][j];
			cout<<'\n';
		}
	}
	return 0;
}



Measured memory_bytes: 2176