s = io.read() f = true for a in s:gmatch("%w+") do if a ~= "AC" then f = false break end end print(f and "Done!" or "Failed...")