fn query(x: usize) -> bool { println!("? {}", x); let mut s = String::new(); std::io::stdin().read_line(&mut s).unwrap(); s.trim() == "out" } fn run() { let mut ok = 0; let mut ng = 1000; while ng - ok > 1 { let mid = (ok + ng) / 2; if query(mid) && query(mid) { ng = mid; } else { ok = mid; } } let ans = if query(ok + 1) { ok + 1 } else { ok }; println!("! {}", ans); } fn main() { run(); }