S = list(input().split(",")) for s in S: if s != "AC": print("Failed...") break else: print("Done!")