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