s = list(map(str, input().split(','))) s = set(s) if len(s) == 1 and 'AC' in s: print('Done!') else: print('Failed...')