puts "! #{(0..2000).bsearch { |x| puts "? #{x}", "? #{x + 1}" [gets.chop, gets.chop] == %w[out out] } - 1}"