s = input().split((',')) if s.count('AC') == len(s): print('Done!') else: print('Failed...')