Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
# Your code here!
N=int(input())

print(N-1)
if input()=="Vacant":
    exit()
print(0)
who=input()
if who=="male":
    start=0
elif who=="female":
    start=1
else:
    exit()

high=N-1
low=0
while True:
    mid=(high+low)//2
    print(mid)
    who=input()
    if who=="male":
        temp=0
    elif who=="female":
        temp=1
    else:
        exit()
    
    if (mid%2)^start==temp:
        low=mid
    else:
        high=mid
    


Fixed submission:
# coding: utf-8
# Your code here!
N=int(input())

print(N-1)
if input()=="Vacant":
    exit()
print(0)
who=input()
if who=="Male":
    start=0
elif who=="Female":
    start=1
else:
    exit()

high=N-1
low=0
while True:
    mid=(high+low)//2
    print(mid)
    who=input()
    if who=="Male":
        temp=0
    elif who=="Female":
        temp=1
    else:
        exit()
    
    if (mid%2)^start==temp:
        low=mid
    else:
        high=mid

Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
# Your code here!
N=int(input())

print(N-1)
if input()=="Vacant":
    exit()
print(0)
who=input()
if who=="male":
    start=0
elif who=="female":
    start=1
else:
    exit()

high=N-1
low=0
while True:
    mid=(high+low)//2
    print(mid)
    who=input()
    if who=="male":
        temp=0
    elif who=="female":
        temp=1
    else:
        exit()
    
    if (N%2)^start==temp:
        low=mid
    else:
        high=mid
    


Fixed submission:
# coding: utf-8
# Your code here!
N=int(input())

print(N-1)
if input()=="Vacant":
    exit()
print(0)
who=input()
if who=="Male":
    start=0
elif who=="Female":
    start=1
else:
    exit()

high=N-1
low=0
while True:
    mid=(high+low)//2
    print(mid)
    who=input()
    if who=="Male":
        temp=0
    elif who=="Female":
        temp=1
    else:
        exit()
    
    if (mid%2)^start==temp:
        low=mid
    else:
        high=mid

Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
# Your code here!
N=int(input())

print(0)
who=input()
if who=="male":
    start=0
elif who=="female":
    start=1
else:
    exit()

high=N-1
low=0
while True:
    mid=(high+low)//2
    print(mid)
    who=input()
    if who=="male":
        temp=0
    elif who=="female":
        temp=1
    else:
        exit()
    
    if (N%2)^start==temp:
        low=mid
    else:
        high=mid
    


Fixed submission:
# coding: utf-8
# Your code here!
N=int(input())

print(N-1)
if input()=="Vacant":
    exit()
print(0)
who=input()
if who=="Male":
    start=0
elif who=="Female":
    start=1
else:
    exit()

high=N-1
low=0
while True:
    mid=(high+low)//2
    print(mid)
    who=input()
    if who=="Male":
        temp=0
    elif who=="Female":
        temp=1
    else:
        exit()
    
    if (mid%2)^start==temp:
        low=mid
    else:
        high=mid

Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
# Your code here!
N=int(input())

i=0
print(i)
ss=input()
if ss == "Vacant":
    exit()
else:
    i=(N-1)//2
    count=4
    while True:
        print(i)
        s=input()
        if s=="Vacant":
            exit()
        elif ss==s:
            i+=max(N//count,2)
            count*=2
        else:
            i-=(N//count,2)
            count*=2

        


Fixed submission:
# coding: utf-8
# Your code here!
N=int(input())

print(N-1)
if input()=="Vacant":
    exit()
print(0)
who=input()
if who=="Male":
    start=0
elif who=="Female":
    start=1
else:
    exit()

high=N-1
low=0
while True:
    mid=(high+low)//2
    print(mid)
    who=input()
    if who=="Male":
        temp=0
    elif who=="Female":
        temp=1
    else:
        exit()
    
    if (mid%2)^start==temp:
        low=mid
    else:
        high=mid

Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
# Your code here!
N=int(input())

i=0
print(i)
ss=input()
if ss == "Vacant":
    exit()
else:
    i=(N-1)//2
    count=4
    while True:
        print(i)
        s=input()
        if s=="Vacant":
            exit()
        elif ss==s:
            i+=max(N//count,1)
            count*=2
        else:
            i-=(N//count,1)
            count*=2        


Fixed submission:
# coding: utf-8
# Your code here!
N=int(input())

print(N-1)
if input()=="Vacant":
    exit()
print(0)
who=input()
if who=="Male":
    start=0
elif who=="Female":
    start=1
else:
    exit()

high=N-1
low=0
while True:
    mid=(high+low)//2
    print(mid)
    who=input()
    if who=="Male":
        temp=0
    elif who=="Female":
        temp=1
    else:
        exit()
    
    if (mid%2)^start==temp:
        low=mid
    else:
        high=mid