class Start def main _ = input echo "? aa" while true x = input break if x[0] == "!" echo "? #{x[-1]}a" end end protected def echo(*x) print(*x) puts end def input = gets.chomp end Start.new.main