ss = gets.chomp.split(?,) flag = ss.all?{_1 == "AC"} puts flag ? "Done!" : "Failed..."