class Start def main while true x = input break if x[0] == "!" echo "? aa" 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