#include using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define ALL(v) begin(v),end(v) #define fi first #define se second template inline bool chmax(A &a, B b) { if (a inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; } using ll = long long; using pii = pair; constexpr ll INF = 1ll<<30; constexpr ll longINF = 1ll<<60; constexpr ll MOD = 1000000007; constexpr bool debug = 0; //---------------------------------// int main() { string S; cin >> S; bool ans = true; REP(i, S.size()) { string T = S.substr(i, 2); string tmp[] = {"WA", "TLE", "MLE"}; REP(j, 3) if (T == tmp[j]) ans = false; T = S.substr(i, 3); REP(j, 3) if (T == tmp[j]) ans = false; } puts(ans ? "Done!" : "Failed..."); return 0; }