#include <bits/stdc++.h>

#define var auto
#define ll long long
//#define APPLY(a, f) f(a.begin(), a.end())
#define APPLY(a, f, ...) f(a.begin(), a.end(), __VA_ARGS__)
#define FUN1(x, f) [&](auto& x){return f;}
#define FUN2(x, y, f) [&](auto& x){return f;}
using namespace std;


int main() {
    string s;
    cin >> s;
    stack<int> st{};
    st.push(0);
    var flag = false;
    for (auto c : s){
        if (c == 'm') {
            if (st.empty() || st.top() % 2 == 1) goto invalid;
            var next = st.top() + 1;
            st.pop();
            st.push(next);
            st.push(0);
        }
        if (c == 'e'){
            if (st.empty() || st.top() >= 2) goto invalid;
            st.pop();
            st.push(2);
        }
        if (c == 'w'){
            if (st.empty() || st.top() < 2) goto invalid;
            st.pop();
        }
    }
    if (st.size() != 1 || st.top() != 1) goto invalid;
    cout << "Cat" << endl;
    return 0;
    invalid:;
    cout << "Rabbit" << endl;
}

### Prompt

In Cpp, your task is to solve the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include <bits/stdc++.h>

#define var auto
#define ll long long
//#define APPLY(a, f) f(a.begin(), a.end())
#define APPLY(a, f, ...) f(a.begin(), a.end(), __VA_ARGS__)
#define FUN1(x, f) [&](auto& x){return f;}
#define FUN2(x, y, f) [&](auto& x){return f;}
using namespace std;


int main() {
    string s;
    cin >> s;
    stack<int> st{};
    st.push(0);
    var flag = false;
    for (auto c : s){
        if (c == 'm') {
            if (st.empty() || st.top() % 2 == 1) goto invalid;
            var next = st.top() + 1;
            st.pop();
            st.push(next);
            st.push(0);
        }
        if (c == 'e'){
            if (st.empty() || st.top() >= 2) goto invalid;
            st.pop();
            st.push(2);
        }
        if (c == 'w'){
            if (st.empty() || st.top() < 2) goto invalid;
            st.pop();
        }
    }
    if (st.size() != 1 || st.top() != 1) goto invalid;
    cout << "Cat" << endl;
    return 0;
    invalid:;
    cout << "Rabbit" << endl;
}

```