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