#include <cstdio>
#include <string>
#include <vector>

using namespace std;

using vs=vector<string>;

const char status[]={'.', '#'};

int send_query(vs &query, bool rightward) {
    for (size_t i=0; i<4; ++i) {
        if (rightward) {
            printf("%s%c\n", query[0].c_str(), status[i&1]);
            printf("%s%c\n", query[1].c_str(), status[i>>1]);
        } else {
            printf("%c%s\n", status[i&1], query[0].c_str());
            printf("%c%s\n", status[i>>1], query[1].c_str());
        }
        fflush(stdout);

        char buf[1<<2];
        scanf("%s", buf);
        string ans=buf;

        if (ans == "end") {
            return 2;
        } else if (ans == "T") {
            if (rightward) {
                query[0] += status[i&1];
                query[1] += status[i>>1];
            } else {
                query[0] = status[i&1] + query[0];
                query[1] = status[i>>1] + query[1];
            }
            return 0;
        }
    }
    return 1;
}

int main() {
    size_t N;
    scanf("%zu", &N);

    vs query(2);
    for (int i=0; i<2;)
        i += send_query(query, i);

    return 0;
}
