#include <bits/stdc++.h>
#define be(v) (v).begin(),(v).end()
#define pb(q) push_back(q)
typedef long long ll;
using namespace std;
const ll mod=1000000007, INF=mod*mod*3LL;
#define doublecout(a) cout<<fixed<<setprecision(10)<<a<<endl;
vector<string> ans;
string a3[3] = {
	"aa.",
	"..a",
	"..a"
};
string a4[4] = {
	"aacd",
	"bbcd",
	"cdaa",
	"cdbb"
};
string a5[5] = {
	"aacca",
	"bbd.a",
	"c.dcc",
	"c..bd",
	".aabd"
};
string a6[6] = {
	"abcc..",
	"abdd..",
	"..abcc",
	"..abdd",
	"cc..ab",
	"dd..ab"
};
string a7[7] = {
	"aa.cd..",
	"bb.cd..",
	"c....cd",
	"c....cd",
	"..aacaa",
	"..bbc.b",
	".cc.ddb"
};
void solve(int n){
	if(n >= 8){
		n -= 4;
		for(int i=0;i<4;i++) for(int j=0;j<4;j++) ans[n+i][n+j] = a4[i][j];
		solve(n);
	}
	else{
		if(n == 4) for(int i=0;i<4;i++) for(int j=0;j<4;j++) ans[i][j] = a4[i][j];
		else if(n == 5) for(int i=0;i<5;i++) for(int j=0;j<5;j++) ans[i][j] = a5[i][j];
		else if(n == 6) for(int i=0;i<6;i++) for(int j=0;j<6;j++) ans[i][j] = a6[i][j];
		else for(int i=0;i<7;i++) for(int j=0;j<7;j++) ans[i][j] = a7[i][j];
	}
}
int main() {
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    ans.resize(n, "");
    for(int i=0;i<n;i++){
    	for(int j=0;j<n;j++){
    		ans[i] += ".";
    	}
    }
    if(n == 2){
    	cout << -1 << endl;
    	return 0;
    }
    if(n == 3){
    	for(int i=0;i<3;i++) cout << a3[i] << endl;
    	return 0;
    }
    solve(n);
    for(int i=0;i<n;i++){
    	cout << ans[i] << endl;
    }
    return 0;
}
