S = input().split(",") if not len(S) - S.count("AC"): print("Done!") else: print("Failed...")