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