import sys

l = sys.stdin.readline().strip().split(" ")
n, k = int(l[0]), int(l[1])

min, max = 1, n
while True:
    mid = n / 2
    print "query", mid
    resp = sys.stdin.readline()
    if resp == "broke":
        max = current - 1
    else:
        min = current + 1
    if max <= min:
        print "answer", mid
    break