Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [0]*(n+1)

print(0)
a = int(input())
if a == "Vacant":
    exit()
s[0] = a
s[n] = a

l = 0
r = n
while True:
    m = (r+l)//2
    print(m)
    a = int(input())
    if a == "Vacant":
        exit()

    s[m] = a
    if s[l] == s[r]:
        if s[l] == s[m]:
            if (m-l) % 2 == 1:
                r = m
            else:
                l = m
        else:
            if (m-l) % 2 == 1:
                l = m
            else:
                r = m
    else:
        if s[l] == s[m]:
            if(m-l) % 2 == 1:
                r = m
            else:
                l = m
        else:
            if(m-l) % 2 == 1:
                l = m
            else:
                r = m


Fixed submission:
n = int(input())
s = [0]*(n+1)

print(0)
a = input()
if a == "Vacant":
    exit()
s[0] = a
s[n] = a

l = 0
r = n
while True:
    m = (r+l)//2
    print(m)
    a = input()
    if a == "Vacant":
        exit()

    s[m] = a
    if s[l] == s[r]:
        if s[l] == s[m]:
            if (m-l) % 2 == 1:
                r = m
            else:
                l = m
        else:
            if (m-l) % 2 == 1:
                l = m
            else:
                r = m
    else:
        if s[l] == s[m]:
            if(m-l) % 2 == 1:
                r = m
            else:
                l = m
        else:
            if(m-l) % 2 == 1:
                l = m
            else:
                r = m

Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline


def send_query(n):
    print(n)
    resp = int(input())
    return resp


N = int(input())
l = 0
r = N-1
l_cur = send_query(0)
if l_cur == "Vacant":
    print(0)
    exit()
r_cur = send_query(N-1)
if r_cur == "Vacant":
    print(N-1)
    exit()

l = 0
cur = l_cur
r = N-1
while True:
    mid = (l+r)//2
    resp = send_query(mid)
    if resp == "Vacant":
        print("ans->", mid)
        break
    elif resp == cur:
        if (mid-l+1) % 2 == 1:
            r = mid-1
        else:
            l = mid+1
    else:
        if (mid-l+1) % 2 == 1:
            l = mid-1
        else:
            r = mid+1
    cur = resp


Fixed submission:
n = int(input())
s = [0]*(n+1)

print(0)
a = input()
if a == "Vacant":
    exit()
s[0] = a
s[n] = a

l = 0
r = n
while True:
    m = (r+l)//2
    print(m)
    a = input()
    if a == "Vacant":
        exit()

    s[m] = a
    if s[l] == s[r]:
        if s[l] == s[m]:
            if (m-l) % 2 == 1:
                r = m
            else:
                l = m
        else:
            if (m-l) % 2 == 1:
                l = m
            else:
                r = m
    else:
        if s[l] == s[m]:
            if(m-l) % 2 == 1:
                r = m
            else:
                l = m
        else:
            if(m-l) % 2 == 1:
                l = m
            else:
                r = m

Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline


def send_query(n):
    print(n)
    resp = int(input())
    return resp


N = int(input())
l = 0
r = N-1
l_cur = send_query(0)
if l_cur == "Vacant":
    print(0)
    exit()
r_cur = send_query(N-1)
if r_cur == "Vacant":
    print(N-1)
    exit()

l = 0
cur = l_cur
r = N-1
while True:
    mid = (l+r)//2+1
    resp = send_query(mid)
    if resp == "Vacant":
        print("ans->", mid)
        break
    elif resp == cur:
        if (mid-l+1) % 2 == 1:
            r = mid-1
        else:
            l = mid+1
    else:
        if (mid-l+1) % 2 == 1:
            l = mid-1
        else:
            r = mid+1
    cur = resp


Fixed submission:
n = int(input())
s = [0]*(n+1)

print(0)
a = input()
if a == "Vacant":
    exit()
s[0] = a
s[n] = a

l = 0
r = n
while True:
    m = (r+l)//2
    print(m)
    a = input()
    if a == "Vacant":
        exit()

    s[m] = a
    if s[l] == s[r]:
        if s[l] == s[m]:
            if (m-l) % 2 == 1:
                r = m
            else:
                l = m
        else:
            if (m-l) % 2 == 1:
                l = m
            else:
                r = m
    else:
        if s[l] == s[m]:
            if(m-l) % 2 == 1:
                r = m
            else:
                l = m
        else:
            if(m-l) % 2 == 1:
                l = m
            else:
                r = m

Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline


def send_query(n):
    print(n)
    resp = int(input())
    return resp


N = int(input())
l = 0
r = N-1

cur = send_query(0)
while True:
    mid = (l+r)//2
    resp = send_query(mid)
    if resp == "Vacant":
        print(mid)
        break
    elif resp == cur:
        r = mid-1
    else:
        l = mid+1
    cur = resp


Fixed submission:
n = int(input())
s = [0]*(n+1)

print(0)
a = input()
if a == "Vacant":
    exit()
s[0] = a
s[n] = a

l = 0
r = n
while True:
    m = (r+l)//2
    print(m)
    a = input()
    if a == "Vacant":
        exit()

    s[m] = a
    if s[l] == s[r]:
        if s[l] == s[m]:
            if (m-l) % 2 == 1:
                r = m
            else:
                l = m
        else:
            if (m-l) % 2 == 1:
                l = m
            else:
                r = m
    else:
        if s[l] == s[m]:
            if(m-l) % 2 == 1:
                r = m
            else:
                l = m
        else:
            if(m-l) % 2 == 1:
                l = m
            else:
                r = m