A = list(map(int, input().split(","))) ans = "Done!" for i in A: if A[i] == "AC": pass else: ans = "Failed..." exit() print(ans)