#include #include #include #include #include #include #include using namespace std; using uint = unsigned int; using ll = long long; #define CIN( LL , A ) LL A; cin >> A #define GETLINE( A ) string A; getline( cin , A ) #define FOR_ITR( ARRAY , ITR , END ) for( auto ITR = ARRAY .begin() , END = ARRAY .end() ; ITR != END ; ITR ++ ) int main() { GETLINE( S ); S = "," + S; const uint size = S.size(); for( uint i = 0 ; i < size ; i++ ){ if( S.substr( i , 1 ) == "," ){ i++; if( S.substr( i , 1 ) != "A" ){ cout << "Failed..." << endl; return 0; } i++; } } cout << "Done!" << endl; return 0; }