def main(): s=set(input().split(',')) if len(s)==1 and "AC" in s: print("Done!") else: print("Failed...") main()