#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); ++i)

bool iscat(const string& S) {
    unsigned p = 0;
    function<bool()> ll = [&] {
        if (S.empty()) return true;
        if (S[p] != 'm') return false;
        p++;
        if (S[p] != 'e') if (!ll() || S[p] != 'e') return false;
        p++;
        if (S[p] != 'w') if (!ll() || S[p] != 'w') return false;
        p++;
        return true;
    };
    return ll() && p == S.size();
}

int main() {
    string S; cin >> S;
    cout << (iscat(S) ? "Cat" : "Rabbit") << endl;
}
### Prompt

Create a solution in cpp for the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); ++i)

bool iscat(const string& S) {
    unsigned p = 0;
    function<bool()> ll = [&] {
        if (S.empty()) return true;
        if (S[p] != 'm') return false;
        p++;
        if (S[p] != 'e') if (!ll() || S[p] != 'e') return false;
        p++;
        if (S[p] != 'w') if (!ll() || S[p] != 'w') return false;
        p++;
        return true;
    };
    return ll() && p == S.size();
}

int main() {
    string S; cin >> S;
    cout << (iscat(S) ? "Cat" : "Rabbit") << endl;
}
```