n = gets.chomp.split(",") puts n.count("AC") == n.length ? "Done!" : "Failed..."