s = set(input().split(",")) fail = {"WA", "TLE", "MLE"} if fail & s: ans = "Failed..." else: ans = "Done!" print(ans)