import java.util.Scanner

fun main(args: Array<String>) {
    val scanner = Scanner(System.`in`)
    val n = scanner.nextInt()
    val s = Array<Int?>(n, { null })

    println(0)
    System.out.flush()
    var temp = scanner.next()
    if (temp == "Vacant") {
        return
    } else {
        s[0] = if (temp == "Male") 0 else 1
        var l = 0
        var p = n / 2
        var r = n - 1
        while(true) {
            println(p)
            System.out.flush()
            temp = scanner.next()
            if (temp == "Vacant") {
                return
            } else {
                s[p] = if (temp == "Male") 0 else 1
                if ((s[l] == s[p]) == ((p - l) % 2 == 0)) {
                    l = p
                } else {
                    r = p
                }
                p = (r + l + 1) / 2
            }
        }
    }
}
