_ = gets.chomp puts "? aa" while true x = gets.chomp break if x[0] == "!" puts "? #{x[-1]}a" end