s = input().split(",") print("Done!") if len(set(s))==1 and list(set(s))[0]=="AC" else print("Failed...")