#include <bits/stdc++.h>
#define ll long long
using namespace std;

int solve(string s, int idx) {
    if (s[idx] != 'm') return -1;
    idx++;
    if (s[idx] != 'e') {
        idx = solve(s, idx);
        if (idx == -1) return -1;
    }
    idx++;
    if (s[idx] != 'w') {
        idx = solve(s, idx);
        if (idx == -1) return -1;
    }
    idx++;
    return idx;
}

int main() {
    string s;
    cin >> s;
    if (solve(s, 0) == s.size()) {
        cout << "Cat" << endl;
    } else {
        cout << "Rabbit" << endl;
    }
    return 0;
}


### Prompt

Create a solution in CPP for the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include <bits/stdc++.h>
#define ll long long
using namespace std;

int solve(string s, int idx) {
    if (s[idx] != 'm') return -1;
    idx++;
    if (s[idx] != 'e') {
        idx = solve(s, idx);
        if (idx == -1) return -1;
    }
    idx++;
    if (s[idx] != 'w') {
        idx = solve(s, idx);
        if (idx == -1) return -1;
    }
    idx++;
    return idx;
}

int main() {
    string s;
    cin >> s;
    if (solve(s, 0) == s.size()) {
        cout << "Cat" << endl;
    } else {
        cout << "Rabbit" << endl;
    }
    return 0;
}


```