program main
  implicit none

  integer(8) :: n, i, j, k, l, p
  character(len=6) :: s, r

  read(*,*) n

  i = 0
     
  write(*,*) i
  read(*,*) s

  if (s == 'Vacant') then
     stop
  end if

  r = s

  j = i
  i = n / 2

  do p = 1, 19
     s = ''
     write(*,*) i
     read(*,*) s

     if(s == 'Vacant') then
        stop
     end if

     if(mod(j-i,2) == 0) then
        if(s == r) then
           l = i
           k = i + (n-i) / 2
        else
           l = i
           k = i - (i-j) / 2
           n = j
        end if

     else
        if(s /= r) then
           l = i
           k = i + (n-i) / 2
        else
           l = i
           k = i - (i-j) / 2
           n = j
        end if
     end if

     r = s
     i = k
     j = l
  end do

end program main

        
  
