Buggy python submission (verdict: Time Limit Exceeded):

#１回のクエリで半分に空席がある場所を絞る
end = int(input())
print(0, flush=True)
S = input().rstrip()[0]
if S == 'V':
    exit()
start = 0
cur = S
for _ in range(19):
    target = start + max(2, (end - start) // 4 * 2)
    print(target, flush=True)
    s = input().rstrip()[0]
    if s == 'V':
        exit()
    if cur != s:
        end = target
    else:
        start = target
print(start + 1, flush=True)
s = input().rstrip()[0]
if s == 'V':
    exit()
else:
    print(start + 2, flush=True):
    exit()
#24


Fixed submission:
N = int(input())

def ask(n):
    print(n, flush=True)
    resp = input().rstrip()[0]
    if resp == 'V':
        exit()
    return resp

def condition(L,R,resp_L,resp_R):
    if (R-L)&1:
        return resp_L == resp_R
    else:
        return resp_L != resp_R

resp = ask(0)

L = 0
R = N
resp_L = resp
resp_R = resp
for _ in range(19):
    M = (L + R) // 2
    resp_M = ask(M)
    if condition(L,M,resp_L,resp_M):
        R,resp_R = M,resp_M
    else:
        L,resp_L = M,resp_M

Buggy python submission (verdict: Time Limit Exceeded):


#１回のクエリで半分に空席がある場所を絞る
end = int(input()) - 1
print(0, flush=True)
S = input().rstrip()[0]
if S == 'V':
    exit()
start = 0
cur = S
for _ in range(19):
    target = start + max(2, (end - start) // 4 * 2)
    print(target, flush=True)
    s = input().rstrip()[0]
    if s == 'V':
        exit()
    if cur != s:
        end = target
    else:
        start = target
print(start + 1, flush=True)
s = input().rstrip()[0]
if s == 'V':
    exit()
else:
    print(start + 2, flush=True):
    exit()
#24


Fixed submission:
N = int(input())

def ask(n):
    print(n, flush=True)
    resp = input().rstrip()[0]
    if resp == 'V':
        exit()
    return resp

def condition(L,R,resp_L,resp_R):
    if (R-L)&1:
        return resp_L == resp_R
    else:
        return resp_L != resp_R

resp = ask(0)

L = 0
R = N
resp_L = resp
resp_R = resp
for _ in range(19):
    M = (L + R) // 2
    resp_M = ask(M)
    if condition(L,M,resp_L,resp_M):
        R,resp_R = M,resp_M
    else:
        L,resp_L = M,resp_M

Buggy python submission (verdict: Time Limit Exceeded):
import sys

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

#１回のクエリで半分に空席がある場所を絞る
end = ri() - 1
print(0, flush=True)
S = input().rstrip()[0]
if S == 'V':
    exit()
start = 0
cur = S
for _ in range(19):
    target = start + max(2, (end - start) // 4 * 2)
    print(target, flush=True)
    s = input().rstrip()[0]
    if s == 'V':
        exit()
    if cur != s:
        end = target
    else:
        start = target
print(start + 1, flush=True)
s = input().rstrip()[0]
if s == 'V':
    exit()
else:
    print(start + 2, flush=True):
    exit()
#24


Fixed submission:
N = int(input())

def ask(n):
    print(n, flush=True)
    resp = input().rstrip()[0]
    if resp == 'V':
        exit()
    return resp

def condition(L,R,resp_L,resp_R):
    if (R-L)&1:
        return resp_L == resp_R
    else:
        return resp_L != resp_R

resp = ask(0)

L = 0
R = N
resp_L = resp
resp_R = resp
for _ in range(19):
    M = (L + R) // 2
    resp_M = ask(M)
    if condition(L,M,resp_L,resp_M):
        R,resp_R = M,resp_M
    else:
        L,resp_L = M,resp_M

Buggy python submission (verdict: Time Limit Exceeded):
import sys

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

#１回のクエリで半分に空席がある場所を絞る
end = ri() - 1
print(0, flush=True)
S = input()[0]
if S == 'V':
    exit()
start = 0
cur = S
for _ in range(19):
    target = start + max(2, (end - start) // 4 * 2)
    print(target, flush=True)
    s = input()[0]
    if s == 'V':
        exit()
    if cur != s:
        end = target
    else:
        start = target
print(start + 1, flush=True)
s = input()[0]
if s == 'V':
    exit()
else:
    print(start + 2, flush=True):
    exit()
#24


Fixed submission:
N = int(input())

def ask(n):
    print(n, flush=True)
    resp = input().rstrip()[0]
    if resp == 'V':
        exit()
    return resp

def condition(L,R,resp_L,resp_R):
    if (R-L)&1:
        return resp_L == resp_R
    else:
        return resp_L != resp_R

resp = ask(0)

L = 0
R = N
resp_L = resp
resp_R = resp
for _ in range(19):
    M = (L + R) // 2
    resp_M = ask(M)
    if condition(L,M,resp_L,resp_M):
        R,resp_R = M,resp_M
    else:
        L,resp_L = M,resp_M

Buggy python submission (verdict: Time Limit Exceeded):
import sys

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

#１回のクエリで半分に空席がある場所を絞る
end = ri() - 1
print(0, flush=True)
S = rs()[0]
if S == 'V':
    exit()
start = 0
cur = S
for _ in range(19):
    target = start + max(2, (end - start) // 4 * 2)
    print(target, flush=True)
    s = rs()[0]
    if s == 'V':
        exit()
    if cur != s:
        end = target
    else:
        start = target
print(start + 1, flush=True)
s = rs()[0]
if s == 'V':
    exit()
else:
    print(start + 2, flush=True):
    exit()
#24


Fixed submission:
N = int(input())

def ask(n):
    print(n, flush=True)
    resp = input().rstrip()[0]
    if resp == 'V':
        exit()
    return resp

def condition(L,R,resp_L,resp_R):
    if (R-L)&1:
        return resp_L == resp_R
    else:
        return resp_L != resp_R

resp = ask(0)

L = 0
R = N
resp_L = resp
resp_R = resp
for _ in range(19):
    M = (L + R) // 2
    resp_M = ask(M)
    if condition(L,M,resp_L,resp_M):
        R,resp_R = M,resp_M
    else:
        L,resp_L = M,resp_M

Buggy python submission (verdict: Time Limit Exceeded):
import sys

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

#１回のクエリで半分に空席がある場所を絞る
end = ri() - 1
print(0)
S = rs()[0]
if S == 'V':
    exit()
start = 0
cur = S
for _ in range(19):
    target = start + max(2, (end - start) // 4 * 2)
    print(target)
    s = rs()[0]
    if s == 'V':
        exit()
    if cur != s:
        end = target
    else:
        start = target
print(start + 1)
s = rs()[0]
if s == 'V':
    exit()
else:
    print(start + 2):
    exit()
#24


Fixed submission:
N = int(input())

def ask(n):
    print(n, flush=True)
    resp = input().rstrip()[0]
    if resp == 'V':
        exit()
    return resp

def condition(L,R,resp_L,resp_R):
    if (R-L)&1:
        return resp_L == resp_R
    else:
        return resp_L != resp_R

resp = ask(0)

L = 0
R = N
resp_L = resp
resp_R = resp
for _ in range(19):
    M = (L + R) // 2
    resp_M = ask(M)
    if condition(L,M,resp_L,resp_M):
        R,resp_R = M,resp_M
    else:
        L,resp_L = M,resp_M

Buggy python submission (verdict: Time Limit Exceeded):
import sys

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

#１回のクエリで半分に空席がある場所を絞る
end = ri() - 1
print(0)
S = rs()
if S == 'Vacant':
    exit()
start = 0
cur = S
while end >= start + 2:
    target = start + max(2, (end - start) // 4 * 2)
    print(target)
    s = rs()
    if s == 'Vacant':
        exit()
    if cur != s:
        end = target
    else:
        start = target
print(start + 1)
s = rs()
if s == 'Vacant':
    exit()
else:
    print(start + 2):
    exit()
#24


Fixed submission:
N = int(input())

def ask(n):
    print(n, flush=True)
    resp = input().rstrip()[0]
    if resp == 'V':
        exit()
    return resp

def condition(L,R,resp_L,resp_R):
    if (R-L)&1:
        return resp_L == resp_R
    else:
        return resp_L != resp_R

resp = ask(0)

L = 0
R = N
resp_L = resp
resp_R = resp
for _ in range(19):
    M = (L + R) // 2
    resp_M = ask(M)
    if condition(L,M,resp_L,resp_M):
        R,resp_R = M,resp_M
    else:
        L,resp_L = M,resp_M

Buggy python submission (verdict: Time Limit Exceeded):
import sys
from collections import Counter

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

#１回のクエリで半分に空席がある場所を絞る
end = ri()
print(0)
S = rs()
if S == 'Vacant':
    exit()
start = 0
cur = S   
while end > start + 2:
    target = start + max(2, (end - start) // 4 * 2)
    print(target)
    S = rs()
    if S == 'Vacant':
        exit()
    if cur != S:
        end = target
    else:
        start = target
print(start + 1)
#24


Fixed submission:
N = int(input())

def ask(n):
    print(n, flush=True)
    resp = input().rstrip()[0]
    if resp == 'V':
        exit()
    return resp

def condition(L,R,resp_L,resp_R):
    if (R-L)&1:
        return resp_L == resp_R
    else:
        return resp_L != resp_R

resp = ask(0)

L = 0
R = N
resp_L = resp
resp_R = resp
for _ in range(19):
    M = (L + R) // 2
    resp_M = ask(M)
    if condition(L,M,resp_L,resp_M):
        R,resp_R = M,resp_M
    else:
        L,resp_L = M,resp_M