#include <cstdio>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    string s;
    cin >> s;
    int n = s.size();
    
    bool ok = true;
    stack<char> stk;
    for(int i=0; i<n; ++i){
        if(s[i] == 'w'){
            if(stk.size() < 2 || (stk.size() < 3 && i != n-1)){
                ok = false;
            }else{
                char c2 = stk.top();
                stk.pop();
                char c1 = stk.top();
                stk.pop();
                if(c1 != 'm' || c2 != 'e')
                    ok = false;
            }
        }else{
            stk.push(s[i]);
        }
    }

    if(ok && stk.size() == 0)
        cout << "Cat" << endl;
    else
        cout << "Rabbit" << endl;

    return 0;
}
### Prompt

Please create a solution in cpp to the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include <cstdio>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    string s;
    cin >> s;
    int n = s.size();
    
    bool ok = true;
    stack<char> stk;
    for(int i=0; i<n; ++i){
        if(s[i] == 'w'){
            if(stk.size() < 2 || (stk.size() < 3 && i != n-1)){
                ok = false;
            }else{
                char c2 = stk.top();
                stk.pop();
                char c1 = stk.top();
                stk.pop();
                if(c1 != 'm' || c2 != 'e')
                    ok = false;
            }
        }else{
            stk.push(s[i]);
        }
    }

    if(ok && stk.size() == 0)
        cout << "Cat" << endl;
    else
        cout << "Rabbit" << endl;

    return 0;
}
```