fun main() {
    val n = readLine()?.toInt() ?: return
    val c = CharArray(n)

    fun query(i: Int): Boolean {
        println(i)
        val s = readLine()!!
        return (s == "Vacant").also {
            c[i] = s[0]
        }
    }

    var l = 0
    if (query(l)) return

    var r = n - 1
    if (query(r)) return

    repeat(20) {
        val m = (l + r) / 2
        if (query(m)) return
        
        if ((m - l) % 2 == 1 && c[l] == c[m]
            || (m - l) % 2 == 0 && c[l] != c[m]
        ) {
            r = m
        } else {
            l = m
        }
    }
    return
}