import std.stdio, std.string, std.conv;
import std.range, std.algorithm, std.array;

void main() {
    int n;
    scan(n);

    int ans;
    int ls, rs;

    ans = query(0);
    if (ans == 2) return;
    ls = ans;

    ans = query(n-1);
    if (ans == 2) return;
    rs = ans;

    int left = 0, right = n - 1;

    while (true) {
        int mid = (left + right) / 2;
        ans = query(mid);

        if (ans == 2) return;

        int b = ((mid - left + 1) & 1) ^ (ls ^ ans);

        if (!b) {
            right = mid;
            rs = ans;
        }
        else {
            left = mid;
            ls = ans;
        }
    }
}

int query(int i) {
    writeln(i);
    stdout.flush();
    string s = readln.chomp;
    if (s == "Male") {
        return 0;
    }
    else if (s == "Female") {
        return 1;
    }
    else {
        return 2;
    }
}


void scan(T...)(ref T args) {
    import std.stdio : readln;
    import std.algorithm : splitter;
    import std.conv : to;
    import std.range.primitives;

    auto line = readln().splitter();
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}



void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}
