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

using ll = long long;
using Vi = vector<int>;
using Vl = vector<ll>;
using Pii = pair<int, int>;
using Pll = pair<ll, ll>;

constexpr int I_INF = numeric_limits<int>::max();
constexpr ll L_INF = numeric_limits<ll>::max();

//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

void solve() {
    ll N;
    cin >> N;

    cout << 0 << endl;

    string r0;
    cin >> r0;

    if (r0 == "Vacant") {
        return;
    }

    string r;
    int left = -1, right = N;
    while (right - left > 1) {
        int mid = (left + right) >> 1;
        cout << mid << endl;
        cin >> r;
        if (r == "Vacant") {
            return;
        }

        if (mid & 1) {
            if (r == r0) {
                right = mid;
            }
            else {
                left = mid;
            }
        }
        else {
            if (r == r0) {
                left = mid;
            }
            else {
                right = mid;
            }
        }
    }

    int cur = left + 1;
    while (true) {
        cout << cur << endl;
        cin >> r;
        if (r == "Vacant") break;
        ++cur;
    }
}

//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

int main() {
#ifdef FASTIO
    cin.tie(0), cout.tie(0);
    ios::sync_with_stdio(false);
#endif
#ifdef FILEINPUT
    ifstream ifs("./in_out/input.txt");
    cin.rdbuf(ifs.rdbuf());
#endif
#ifdef FILEOUTPUT
    ofstream ofs("./in_out/output.txt");
    cout.rdbuf(ofs.rdbuf());
#endif
    solve();
    cout << flush;
    return 0;
}
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
constexpr int Inf = 1000000000;
constexpr ll INF= 1e18;
constexpr ll MOD = 1000000007;
const double PI = 3.1415926535897;
typedef pair<int,int> P;
 
template<typename T>
T Pow(T a,T b) {
    T ret = 1;
    for(int i = 0;i < b;i++) {
        ret *= a;
    }
    return ret;
}
 
ll mod(ll val) {
    ll res = val % MOD;
    if(res < 0) {
        res += MOD;
    }
    return res;
}
 
ll RS(ll N, ll P, ll M){
    if(P==0) return 1;
    if(P%2==0){
        ll t = RS(N, P/2, M);
        return t*t % M;
    }
    return N * RS(N, P-1, M) % M;
}

int main() {
    int N;
    cin >> N;
    if(N == 2) {
        cout << -1 << endl;
        return 0;
    }
    vector<vector<char>> three = {
        {'a','a','b'},
        {'b','.','b'},
        {'b','a','a'}
    };
    vector<vector<char>> four = {
        {'a','a','c','a'},
        {'b','b','c','a'},
        {'a','e','d','d'},
        {'a','e','c','c'},
    };
    vector<vector<char>> five = {
        {'a','a','b','b','c'},
        {'b','.','.','a','c'},
        {'b','.','.','a','b'},
        {'a','b','b','.','b'},
        {'a','c','c','a','a'},
    };
    vector<vector<char>> seven = {
        {'.','a','a','b','b','c','.'},
        {'d','d','.','.','.','c','e'},
        {'f','.','.','.','a','.','e'},
        {'f','.','.','.','a','.','f'},
        {'h','.','a','a','.','.','f'},
        {'h','g','.','.','.','a','a'},
        {'.','g','a','a','b','b','.'},
    };
    if(N == 3) {
        for(int i = 0;i < 3;i++) {
            for(int j = 0;j < 3;j++) {
                cout << three.at(i).at(j);
            }
            cout << endl;
        }
        return 0;
    }
    else if(N == 6) {
        vector<vector<char>> ret(N,vector<char>(N,'.'));
        for(int i = 0;i < 2;i++) {
            for(int j = 0;j < 3;j++) {
                for(int k = 0;k < 3;k++) {
                    ret.at(3 * i + j).at(3 * i + k) = three.at(j).at(k);
                }
            }
        }
        for(int i = 0;i < N;i++) {
            for(int j = 0;j < N;j++) {
                cout << ret.at(i).at(j);
            }
            cout << endl;
        }
        return 0;
    }
    int Four = 0;
    int Five = 0;
    int Seven = 0;
    for(int i = 0;i <= 400;i++) {
        for(int j = 0;j <= 400;j++) {
            for(int k = 0;k <= 400;k++) {
                if(i * 4 + j * 5 + k * 7 == N) {
                    Four = i;
                    Five = j;
                    Seven = k;
                    break;
                }
            }
        }
    }
    vector<vector<char>> ret(N,vector<char>(N,'.'));
    int cnt = 0;
    for(int i = 0;i < Four;i++) {
        for(int j = 0;j < 4;j++) {
            for(int k = 0;k < 4;k++) {
                ret.at(cnt + j).at(cnt + k) = four.at(j).at(k);
            }
        }
        cnt += 4;
    }
    for(int i = 0;i < Five;i++) {
        for(int j = 0;j < 5;j++) {
            for(int k = 0;k < 5;k++) {
                ret.at(cnt + j).at(cnt + k) = five.at(j).at(k);
            }
        }
        cnt += 5;
    }
    for(int i = 0;i < Seven;i++) {
        for(int j = 0;j < 7;j++) {
            for(int k = 0;k < 7;k++) {
                ret.at(cnt + j).at(cnt + k) = seven.at(j).at(k);
            }
        }
        cnt += 7;
    }
    for(int i = 0;i < N;i++) {
        for(int j = 0;j < N;j++) {
            cout << ret.at(i).at(j);
        }
        cout << endl;
    }
}