S = list(input().split(',')) print('Done!' if all(s == 'AC' for s in S) else 'Failed...')