S = set(input().split(",")) for s in S: if s!="AC": print("Failed...") exit() print("Done!")