import system.io

query i f = do
  print i
  s <- getline
  case s of
    'v':_ -> return ()
    _ -> f s

test l r s t
  | odd (r-l) = s == t
  | otherwise = s /= t

loop l r s = do
  query m $ \t -> do
  if test l m s t then
    loop l m s
  else
    loop m r t
  where m = (l+r)`div`2

main = do
  hsetbuffering stdout linebuffering
  n <- readln
  query 0 $ \s -> do
  query (n-1) $ \_ -> do
  loop 0 (n-1) s