s=list(input().split(',')) n=len(s) a=['AC']*n print(['Failed...','Done!'][s==a])