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