Buggy python submission (verdict: Time Limit Exceeded):
def apc001_c():
    import sys
    n = int(input())

    lower = 0
    print(lower)
    sys.stdout.flush()
    seat_low = str(input())
    if seat_low == 'Vacant': return

    upper = n-1
    print(upper)
    sys.stdout.flush()
    seat_up = str(input())
    if seat_up == 'Vacant': return

    while upper - lower > 1:
        x = (upper + lower) // 2
        print(x)
        sys.stdout.flush()
        s = str(input())
        if s == seat_low: lower = x
        elif s == seat_up: upper = x
        else: return

if __name__ == '__main__':
    apc001_c()
    exit(0)

Fixed submission:
def apc001_c():
    import sys
    n = int(input())

    def ask(x:int):
        print(x)
        sys.stdout.flush()
        res = str(input())
        return res

    lower = 0
    seat_low = ask(lower)
    if seat_low == 'Vacant': return

    upper = n-1
    seat_up = ask(upper)
    if seat_up == 'Vacant': return

    while upper - lower > 1:
        x = (upper + lower) // 2
        s = ask(x)
        if s == 'Vacant': return
        if x % 2 == 0:
            if s == seat_low: lower = x
            else: upper = x
        else:
            if s == seat_up: lower = x
            else: upper = x

if __name__ == '__main__':
    apc001_c()

Buggy python submission (verdict: Time Limit Exceeded):
def apc001_c():
    import sys
    readline = sys.stdin.buffer.readline
    n = int(input())

    lower = 0
    print(lower)
    sys.stdout.flush()
    # seat_low = str(input())
    seat_low = str(readline())
    if seat_low == 'Vacant': return

    upper = n-1
    print(upper)
    sys.stdout.flush()
    # seat_up = str(input())
    seat_up = str(readline())
    if seat_up == 'Vacant': return

    cnt = 0
    while upper - lower > 1:
        x = (upper + lower) // 2
        print(x)
        sys.stdout.flush()
        # s = str(input())
        s = str(readline())
        if s == seat_low: lower = x
        elif s == seat_up: upper = x
        else: return
        cnt += 1
        if cnt > 20: break

if __name__ == '__main__':
    apc001_c()

Fixed submission:
def apc001_c():
    import sys
    n = int(input())

    def ask(x:int):
        print(x)
        sys.stdout.flush()
        res = str(input())
        return res

    lower = 0
    seat_low = ask(lower)
    if seat_low == 'Vacant': return

    upper = n-1
    seat_up = ask(upper)
    if seat_up == 'Vacant': return

    while upper - lower > 1:
        x = (upper + lower) // 2
        s = ask(x)
        if s == 'Vacant': return
        if x % 2 == 0:
            if s == seat_low: lower = x
            else: upper = x
        else:
            if s == seat_up: lower = x
            else: upper = x

if __name__ == '__main__':
    apc001_c()

Buggy python submission (verdict: Time Limit Exceeded):
def apc001_c():
    import sys
    readline = sys.stdin.buffer.readline
    n = int(input())

    lower = 0
    print(lower)
    sys.stdout.flush()
    # seat_low = str(input())
    seat_low = str(readline())
    if seat_low == 'Vacant': return

    upper = n-1
    print(upper)
    sys.stdout.flush()
    # seat_up = str(input())
    seat_up = str(readline())
    if seat_up == 'Vacant': return

    cnt = 0
    while upper - lower > 1:
        x = (upper + lower) // 2
        print(x)
        sys.stdout.flush()
        # s = str(input())
        s = str(readline())
        if s == seat_low: lower = x
        elif s == seat_up: upper = x
        else: return
        cnt += 1
        if cnt > 20: break

if __name__ == '__main__':
    apc001_c()

Fixed submission:
def apc001_c():
    import sys
    n = int(input())

    def ask(x:int):
        print(x)
        sys.stdout.flush()
        res = str(input())
        return res

    lower = 0
    seat_low = ask(lower)
    if seat_low == 'Vacant': return

    upper = n-1
    seat_up = ask(upper)
    if seat_up == 'Vacant': return

    while upper - lower > 1:
        x = (upper + lower) // 2
        s = ask(x)
        if s == 'Vacant': return
        if x % 2 == 0:
            if s == seat_low: lower = x
            else: upper = x
        else:
            if s == seat_up: lower = x
            else: upper = x

if __name__ == '__main__':
    apc001_c()

Buggy python submission (verdict: Time Limit Exceeded):
def apc001_c():
    import sys
    n = int(input())

    lower = 0
    print(lower)
    sys.stdout.flush()
    seat_low = str(input())
    if seat_low == 'Vacant': return

    upper = n-1
    print(upper)
    sys.stdout.flush()
    seat_up = str(input())
    if seat_up == 'Vacant': return

    cnt = 0
    while upper - lower > 1:
        x = (upper + lower) // 2
        print(x)
        sys.stdout.flush()
        s = str(input())
        if s == seat_low: lower = x
        elif s == seat_up: upper = x
        else: return
        cnt += 1
        if cnt > 20: break

if __name__ == '__main__':
    apc001_c()

Fixed submission:
def apc001_c():
    import sys
    n = int(input())

    def ask(x:int):
        print(x)
        sys.stdout.flush()
        res = str(input())
        return res

    lower = 0
    seat_low = ask(lower)
    if seat_low == 'Vacant': return

    upper = n-1
    seat_up = ask(upper)
    if seat_up == 'Vacant': return

    while upper - lower > 1:
        x = (upper + lower) // 2
        s = ask(x)
        if s == 'Vacant': return
        if x % 2 == 0:
            if s == seat_low: lower = x
            else: upper = x
        else:
            if s == seat_up: lower = x
            else: upper = x

if __name__ == '__main__':
    apc001_c()

Buggy python submission (verdict: Time Limit Exceeded):
def apc001_c():
    import sys
    n = int(input())

    lower = 0
    print(lower)
    sys.stdout.flush()
    seat_low = str(input())
    if seat_low == 'Vacant': return

    upper = n-1
    print(upper)
    sys.stdout.flush()
    seat_up = str(input())
    if seat_up == 'Vacant': return

    while upper - lower >= 2:
        x = (upper + lower) // 2
        print(x)
        sys.stdout.flush()
        s = str(input())
        if s == seat_low: lower = x
        elif s == seat_up: upper = x
        else: return

if __name__ == '__main__':
    apc001_c()

Fixed submission:
def apc001_c():
    import sys
    n = int(input())

    def ask(x:int):
        print(x)
        sys.stdout.flush()
        res = str(input())
        return res

    lower = 0
    seat_low = ask(lower)
    if seat_low == 'Vacant': return

    upper = n-1
    seat_up = ask(upper)
    if seat_up == 'Vacant': return

    while upper - lower > 1:
        x = (upper + lower) // 2
        s = ask(x)
        if s == 'Vacant': return
        if x % 2 == 0:
            if s == seat_low: lower = x
            else: upper = x
        else:
            if s == seat_up: lower = x
            else: upper = x

if __name__ == '__main__':
    apc001_c()

Buggy python submission (verdict: Time Limit Exceeded):
def apc001_c():
    import sys
    n = int(input())

    rt = 0
    print(rt)
    sys.stdout.flush()
    rt_name = str(input())
    if rt_name == 'Vacant': return

    lf = n-1
    print(lf)
    sys.stdout.flush()
    lf_name = str(input())
    if lf_name == 'Vacant': return

    while rt - lf >= 2:
        x = (rt + lf) // 2
        print(x)
        sys.stdout.flush()
        s = str(input())
        if s == rt_name: rt = x
        elif s == lf_name: lf = x
        else: return

if __name__ == '__main__':
    apc001_c()

Fixed submission:
def apc001_c():
    import sys
    n = int(input())

    def ask(x:int):
        print(x)
        sys.stdout.flush()
        res = str(input())
        return res

    lower = 0
    seat_low = ask(lower)
    if seat_low == 'Vacant': return

    upper = n-1
    seat_up = ask(upper)
    if seat_up == 'Vacant': return

    while upper - lower > 1:
        x = (upper + lower) // 2
        s = ask(x)
        if s == 'Vacant': return
        if x % 2 == 0:
            if s == seat_low: lower = x
            else: upper = x
        else:
            if s == seat_up: lower = x
            else: upper = x

if __name__ == '__main__':
    apc001_c()

Buggy python submission (verdict: Time Limit Exceeded):
def apc001_c():
    import sys
    n = int(input())

    rt = 0
    print(rt)
    sys.stdout.flush()
    rt_name = str(input())
    lf = n-1
    print(lf)
    sys.stdout.flush()
    lf_name = str(input())

    while rt - lf >= 2:
        x = (rt + lf) // 2
        print(x)
        sys.stdout.flush()
        s = str(input())
        if s == rt_name: rt = x
        else: lf = x

if __name__ == '__main__':
    apc001_c()

Fixed submission:
def apc001_c():
    import sys
    n = int(input())

    def ask(x:int):
        print(x)
        sys.stdout.flush()
        res = str(input())
        return res

    lower = 0
    seat_low = ask(lower)
    if seat_low == 'Vacant': return

    upper = n-1
    seat_up = ask(upper)
    if seat_up == 'Vacant': return

    while upper - lower > 1:
        x = (upper + lower) // 2
        s = ask(x)
        if s == 'Vacant': return
        if x % 2 == 0:
            if s == seat_low: lower = x
            else: upper = x
        else:
            if s == seat_up: lower = x
            else: upper = x

if __name__ == '__main__':
    apc001_c()