#include <cstdio>
#include <iostream>
#include <cmath>
#include <ctype.h>
#include <string> 
#include <sstream>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <map>
#include <queue>
#include <utility>
#include <vector>
#include <set>
#include <list>
#include <cstring>
#include <stack>
   
using namespace std;

int main()
{
    string s;
    cin >> s;
    stack<char> st;
    bool ans = true;
    for(int i = 0; i < s.length(); i++){
        if(s[i] == 'w' && st.size() > 1 && st.top() == 'e' && (i == s.length() - 1 || s[i + 1] != 'm')){
            st.pop();
            st.pop();
        } else {
            st.push(s[i]);
        }
        if(st.empty() && i < s.length() - 1){
            ans = false;
        }
    }
    if(!st.empty()) ans = false;
    if(ans) cout << "Cat" << endl;
    else cout << "Rabbit" << endl;
    return 0;
}
### Prompt

Construct a cpp code solution to the problem outlined:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include <cstdio>
#include <iostream>
#include <cmath>
#include <ctype.h>
#include <string> 
#include <sstream>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <map>
#include <queue>
#include <utility>
#include <vector>
#include <set>
#include <list>
#include <cstring>
#include <stack>
   
using namespace std;

int main()
{
    string s;
    cin >> s;
    stack<char> st;
    bool ans = true;
    for(int i = 0; i < s.length(); i++){
        if(s[i] == 'w' && st.size() > 1 && st.top() == 'e' && (i == s.length() - 1 || s[i + 1] != 'm')){
            st.pop();
            st.pop();
        } else {
            st.push(s[i]);
        }
        if(st.empty() && i < s.length() - 1){
            ans = false;
        }
    }
    if(!st.empty()) ans = false;
    if(ans) cout << "Cat" << endl;
    else cout << "Rabbit" << endl;
    return 0;
}
```