import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines s = readline().decode().strip() splitted = s.split(",") n = len(splitted) counter = {} for sp in splitted: counter[sp] = counter.get(sp, 0) + 1 if counter.get("AC", 0) == n: print("Done!") else: print("Failed...")