#include <bits/stdc++.h>

using namespace std;

using _loop_int = int;
#define REP(i,n) for(_loop_int i=0; i<(_loop_int)(n); i++)
#define FOR(i,a,b) for(_loop_int i=(_loop_int)(a); i<(_loop_int)(b); i++)
#define FORR(i,a,b) for(_loop_int i=(_loop_int)(b)-1; i>=(_loop_int)(a); i--)

#define INF 1000000007
#define INFL (1LL << 60)
#define MOD 998244353
#define ALL(v) v.begin(),v.end()
#define pb push_back
#define ll long long int
#define P pair<ll, ll>

ll min(ll a, ll b){return (a<b?a:b);}
ll max(ll a, ll b){return (a>b?a:b);}

int main(){
	int n;
	cin >> n;
	string s[n];
	REP(i, n){
		string t = "";
		REP(j, n) t += ".";
		s[i] = t;
	}
	if(n == 2){
		cout << -1 << endl;
		return 0;
	}
	if(n%6==4){
		int x = 0, y = 0;
		while(!(x==n&&y==n)){
			s[x][y]='a';
			s[x+1][y]='a';
			s[x][y+1]='b';
			s[x+1][y+1]='b';
			x += 2;
			if(x==n) break;
			s[x][y]='c';
			s[x+1][y]='d';
			s[x][y+1]='c';
			s[x+1][y+1]='d';
			y+=2;
		}
		s[0][n-2]='c';
		s[1][n-2]='d';
		s[0][n-1]='c';
		s[1][n-1]='d';
		REP(i, n) cout << s[i] << endl;
	}
	if(n%3==0){
		int x = 0, y = 0;
		while(!(x==n && y==n)){
			s[x][y] = 'a';
			x++;
			s[x][y] = 'a';
			x++; y++;
			s[x][y] = 'a';
			y++;
			s[x][y] = 'a';
			x++; y++;
		}
		REP(i, n) cout << s[i] << endl;
	}
	if(n%6==1){
		int p = (n-1)/3;
		vector<int> v;
		v.pb(2);
		v.pb(0);
		REP(i, (n-1)/6){
			v.pb(2);
			v.pb(1);
		}
		int a[p][p];
		REP(i, p) REP(j, p) a[i][j] = v[(i+j)%p];
		REP(i, p){
			REP(j, p){
				if(a[i][j]==1){
					s[3*i][3*j]='a';
					s[3*i+1][3*j]='a';
					s[3*i+2][3*j+1]='a';
					s[3*i+2][3*j+2]='a';
				}
				else if(a[i][j]==2){
					s[3*i][3*j]='b';
					s[3*i+1][3*j]='b';
					s[3*i+2][3*j]='c';
					s[3*i+2][3*j+1]='c';
					s[3*i+2][3*j+2]='b';
					s[3*i+1][3*j+2]='b';
					s[3*i][3*j+2]='c';
					s[3*i][3*j+1]='c';
				}
			}
		}
		REP(i, n-1){
			if(i%4<2) s[n-1][i] = 'd';
			else s[n-1][i] ='e';
			if(i%4<2) s[i][n-1] = 'd';
			else s[i][n-1] ='e';
		}
		REP(i, n) cout << s[i] << endl;
	}
	if(n%6==2){
		int p = (n-2)/3;
		vector<int> v;
		v.pb(1);
		v.pb(0);
		REP(i, (n-2)/6){
			v.pb(1);
			v.pb(2);
		}
		int a[p][p];
		REP(i, p) REP(j, p) a[i][j] = v[(i+j)%p];
		REP(i, p){
			REP(j, p){
				if(a[i][j]==1){
					s[3*i+1][3*j+1]='a';
					s[3*i+2][3*j+1]='a';
					s[3*i+3][3*j+2]='a';
					s[3*i+3][3*j+3]='a';
				}
				else if(a[i][j]==2){
					s[3*i+1][3*j+1]='b';
					s[3*i+2][3*j+1]='b';
					s[3*i+3][3*j+1]='c';
					s[3*i+3][3*j+2]='c';
					s[3*i+3][3*j+3]='b';
					s[3*i+2][3*j+3]='b';
					s[3*i+1][3*j+3]='c';
					s[3*i+1][3*j+2]='c';
				}
			}
		}
		FOR(i, 1, n-1){
			if((i-1)%4<2) s[n-1][i] = 'd';
			else s[n-1][i] ='e';
			if((i-1)%4<2) s[i][n-1] = 'd';
			else s[i][n-1] ='e';
			if((i-1)%4<2) s[0][i] = 'd';
			else s[0][i] ='e';
			if((i-1)%4<2) s[i][0] = 'd';
			else s[i][0] ='e';
		}
		REP(i, n) cout << s[i] << endl;
	}
	if(n%6==5){
		int p = (n-2)/3;
		vector<int> v;
		v.pb(1);
		REP(i, (n-2)/6){
			v.pb(2);
			v.pb(1);
		}
		int a[p][p];
		REP(i, p) REP(j, p) a[i][j] = v[(i+j)%p];
		REP(i, p){
			REP(j, p){
				if(a[i][j]==1){
					s[3*i+1][3*j+1]='a';
					s[3*i+2][3*j+1]='a';
					s[3*i+3][3*j+2]='a';
					s[3*i+3][3*j+3]='a';
				}
				else if(a[i][j]==2){
					s[3*i+1][3*j+1]='b';
					s[3*i+2][3*j+1]='b';
					s[3*i+3][3*j+1]='c';
					s[3*i+3][3*j+2]='c';
					s[3*i+3][3*j+3]='b';
					s[3*i+2][3*j+3]='b';
					s[3*i+1][3*j+3]='c';
					s[3*i+1][3*j+2]='c';
				}
			}
		}
		if(n%12==5){
			REP(i, n-1){
				if(i%4<2){
					s[0][i] = 'd';
					s[i][n-1] = 'd';
					s[n-1][n-1-i] = 'd';
					s[n-1-i][0] = 'd';
				}
				else{
					s[0][i] = 'e';
					s[i][n-1] = 'e';
					s[n-1][n-1-i] = 'e';
					s[n-1-i][0] = 'e';
				}
			}
		}
		else{
			REP(i, n-1){
				if(i%4<2){
					s[0][i] = 'd';
					s[i][n-1] = 'e';
					s[n-1][n-1-i] = 'd';
					s[n-1-i][0] = 'e';
				}
				else{
					s[0][i] = 'e';
					s[i][n-1] = 'd';
					s[n-1][n-1-i] = 'e';
					s[n-1-i][0] = 'd';
				}
			}
		}
		REP(i, n) cout << s[i] << endl;
	}
	return 0;
} 


Measured memory_bytes: 2688