S = input().split(",") if "AC" in S and len(set(S)) == 1: print("Done!") else: print("Failed...")