#include <bits/stdc++.h>

char str[10];

bool ask(std::string row[], bool left) {
    std::string tmpRow[2];
    for(int i = 0; i < 4; ++ i) {
        tmpRow[0] = row[0];
        tmpRow[1] = row[1];
        if(left) {
            tmpRow[0] = ((i & 1) ? "." : "#") + row[0];
            tmpRow[1] = ((i & 2) ? "." : "#") + row[1];
        } else {
            tmpRow[0] = row[0] + ((i & 1) ? "." : "#");
            tmpRow[1] = row[1] + ((i & 2) ? "." : "#");
        }
        printf("%s\n%s\n", tmpRow[0].c_str(), tmpRow[1].c_str());
        fflush(stdout);
        scanf("%s", str);
        if(str[0] == 'T') {
            row[0] = tmpRow[0];
            row[1] = tmpRow[1];
            return true;
        }
    }
    return false;
}

void MAIN() {
    int n;
    scanf("%d", &n);
    bool left = true;
    std::string row[2] = { "", "" };
    for(int i = 0; i < n; ++ i) {
        if(ask(row, left)) {
            continue;
        } else {
            left = !left;
            ask(row, left);
        }
    }
    printf("%s\n%s\n", row[0].c_str(), row[1].c_str());
}

int main() {
    MAIN();
    return 0;
}
