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

int main() {
    // your code goes here
    ll n,i,j;
    cin >> n;
    if(n%3==0){
        for(i=1;i<=n;i++){
            for(j=1;j<=n;j++){
                if(i%3==1){
                    if(j==i) cout << "a";
                    else cout << ".";
                } else if(i%3==2){
                    if(j==i-1) cout << "a";
                    else cout << ".";
                } else {
                    if(j==i-1||j==i) cout << "b";
                    else cout << ".";
                }
            }
            cout << endl;
        }
    } else if(n%4==0) {
        for(i=1;i<=n;i++){
            for(j=1;j<=n;j++){
                if(i%4==1){
                    if(j==i) cout << "a";
                    else if(j==i+1) cout << "b";
                    else if(j==i+2||j==i+3) cout << "c";
                    else cout << ".";
                } else if(i%4==2){
                    if(j==i-1) cout << "a";
                    else if(j==i) cout << "b";
                    else if(j==i+1||j==i+2) cout << "d";
                    else cout << ".";
                } else if(i%4==3){
                    if(j==i-2||j==i-1) cout << "c";
                    else if(j==i) cout << "a";
                    else if(j==i+1) cout << "b";
                    else cout << ".";
                } else {
                    if(j==i-3||j==i-2) cout << "d";
                    else if(j==i-1) cout << "a";
                    else if(j==i) cout << "b";
                    else cout << ".";
                }
            }
            cout << endl;
        }
    } else if (n%4==2&&n>=6){
    	for(i=1;i<=6;i++){
            for(j=1;j<=n;j++){
                if(i%6==1){
                    if(j==i) cout << "a";
                    else if(j==i+1) cout << "b";
                    else if(j==i+2) cout << "c";
                    else if(j==i+3) cout << "c";
                    else cout << ".";
                } else if(i%6==2){
                    if(j==i-1) cout << "a";
                    else if(j==i) cout << "b";
                    else if(j==i+1) cout << "d";
                    else if(j==i+2) cout << "d";
                    else cout << ".";
                } else if(i%6==3){
                    if(j==i-2) cout << "c";
                    else if(j==i-1) cout << "c";
                    else if(j==i+2) cout << "a";
                    else if(j==i+3) cout << "b";
                    else cout << ".";
                } else if(i%6==4){
                    if(j==i-3) cout << "d";
                    else if(j==i-2) cout << "d";
                    else if(j==i+1) cout << "a";
                    else if(j==i+2) cout << "b";
                    else cout << ".";
                } else if(i%6==5){
                    if(j==i-2) cout << "a";
                    else if(j==i-1) cout << "b";
                    else if(j==i) cout << "c";
                    else if(j==i+1) cout << "c";
                    else cout << ".";
                } else {
                    if(j==i-3) cout << "a";
                    else if(j==i-2) cout << "b";
                    else if(j==i-1) cout << "d";
                    else if(j==i) cout << "d";
                    else cout << ".";
                }
            }
            cout << endl;
        }
        for(i=7;i<=n;i++){
            for(j=1;j<=n;j++){
                if(i%4==3){
                    if(j==i) cout << "a";
                    else if(j==i+1) cout << "b";
                    else if(j==i+2||j==i+3) cout << "c";
                    else cout << ".";
                } else if(i%4==0){
                    if(j==i-1) cout << "a";
                    else if(j==i) cout << "b";
                    else if(j==i+1||j==i+2) cout << "d";
                    else cout << ".";
                } else if(i%4==1){
                    if(j==i-2||j==i-1) cout << "c";
                    else if(j==i) cout << "a";
                    else if(j==i+1) cout << "b";
                    else cout << ".";
                } else {
                    if(j==i-3||j==i-2) cout << "d";
                    else if(j==i-1) cout << "a";
                    else if(j==i) cout << "b";
                    else cout << ".";
                }
            }
            cout << endl;
        }
    } else if(n%4==1&&n>=9){
            cout << "a..cff...";
            for(j=10;j<=n;j++) cout << "."; cout << endl;
            cout << "a..c.e...";
            for(j=10;j<=n;j++) cout << "."; cout << endl;
            cout << ".bbdde...";
            for(j=10;j<=n;j++) cout << "."; cout << endl;
            cout << "...a..cff";
            for(j=10;j<=n;j++) cout << "."; cout << endl;
            cout << "...a..c.e";
            for(j=10;j<=n;j++) cout << "."; cout << endl;
            cout << "....bbdde";
            for(j=10;j<=n;j++) cout << "."; cout << endl;
            cout << "cff...a..";
            for(j=10;j<=n;j++) cout << "."; cout << endl;
            cout << "c.e...a..";
            for(j=10;j<=n;j++) cout << "."; cout << endl;
            cout << "dde....bb";
            for(j=10;j<=n;j++) cout << "."; cout << endl;
        for(i=10;i<=n;i++){
            for(j=1;j<=n;j++){
                if(i%4==2){
                    if(j==i) cout << "a";
                    else if(j==i+1) cout << "b";
                    else if(j==i+2||j==i+3) cout << "c";
                    else cout << ".";
                } else if(i%4==3){
                    if(j==i-1) cout << "a";
                    else if(j==i) cout << "b";
                    else if(j==i+1||j==i+2) cout << "d";
                    else cout << ".";
                } else if(i%4==0){
                    if(j==i-2||j==i-1) cout << "c";
                    else if(j==i) cout << "a";
                    else if(j==i+1) cout << "b";
                    else cout << ".";
                } else {
                    if(j==i-3||j==i-2) cout << "d";
                    else if(j==i-1) cout << "a";
                    else if(j==i) cout << "b";
                    else cout << ".";
                }
            }
            cout << endl;
        }
    } else if(n>=15) {
            cout << "a..cff.........";
            for(j=16;j<=n;j++) cout << "."; cout << endl;
            cout << "a..c.e.........";
            for(j=16;j<=n;j++) cout << "."; cout << endl;
            cout << ".bbdde.........";
            for(j=16;j<=n;j++) cout << "."; cout << endl;
            cout << "...a..cff......";
            for(j=16;j<=n;j++) cout << "."; cout << endl;
            cout << "...a..c.e......";
            for(j=16;j<=n;j++) cout << "."; cout << endl;
            cout << "....bbdde......";
            for(j=16;j<=n;j++) cout << "."; cout << endl;
            cout << "......a..cff...";
            for(j=16;j<=n;j++) cout << "."; cout << endl;
            cout << "......a..c.e...";
            for(j=16;j<=n;j++) cout << "."; cout << endl;
            cout << ".......bbdde...";
            for(j=16;j<=n;j++) cout << "."; cout << endl;
            cout << ".........a..cff";
            for(j=16;j<=n;j++) cout << "."; cout << endl;
            cout << ".........a..c.e";
            for(j=16;j<=n;j++) cout << "."; cout << endl;
            cout << "..........bbdde";
            for(j=16;j<=n;j++) cout << "."; cout << endl;
            cout << "cff.........a..";
            for(j=16;j<=n;j++) cout << "."; cout << endl;
            cout << "c.e.........a..";
            for(j=16;j<=n;j++) cout << "."; cout << endl;
            cout << "dde..........bb";
            for(j=16;j<=n;j++) cout << "."; cout << endl;
        for(i=16;i<=n;i++){
            for(j=1;j<=n;j++){
                if(i%4==0){
                    if(j==i) cout << "a";
                    else if(j==i+1) cout << "b";
                    else if(j==i+2||j==i+3) cout << "c";
                    else cout << ".";
                } else if(i%4==1){
                    if(j==i-1) cout << "a";
                    else if(j==i) cout << "b";
                    else if(j==i+1||j==i+2) cout << "d";
                    else cout << ".";
                } else if(i%4==2){
                    if(j==i-2||j==i-1) cout << "c";
                    else if(j==i) cout << "a";
                    else if(j==i+1) cout << "b";
                    else cout << ".";
                } else {
                    if(j==i-3||j==i-2) cout << "d";
                    else if(j==i-1) cout << "a";
                    else if(j==i) cout << "b";
                    else cout << ".";
                }
            }
            cout << endl;
        }
    } else if(n==5){
        cout << "abbaa" << endl;
        cout << "ac..b" << endl;
        cout << "bc..b" << endl;
        cout << "b.eea" << endl;
        cout << "aabba" << endl;
    } else if(n==11){
        cout << "abbaa......" << endl;
        cout << "ac..b......" << endl;
        cout << "bc..b......" << endl;
        cout << "b.eea......" << endl;
        cout << "aabba......" << endl;
        cout << ".....abcc.." << endl;
        cout << ".....abdd.." << endl;
        cout << ".....cc..ab" << endl;
        cout << ".....dd..ab" << endl;
        cout << ".......abcc" << endl;
        cout << ".......abdd" << endl;
    } else if(n==7){
        cout << "..abc.." << endl;
        cout << "..abc.." << endl;
        cout << "aad..aa" << endl;
        cout << "bbd..bb" << endl;
        cout << "cc.eecc" << endl;
        cout << "..abc.." << endl;
        cout << "..abc.." << endl;
    } else {
        cout << "-1" << endl;
    }
    return 0;
}



Measured memory_bytes: 1280