#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

bool check(string s, int &p, int n){
    if(p >= n) return true;
    if(s[p] != 'm') return false;
    p++;
    if(s[p] != 'e'){
        bool ret = check(s, p, n);
        if(!ret) return false;
    }
    if(s[p] != 'e') return false;
    p++;
    if(s[p] != 'w'){
        bool ret = check(s, p, n);
        if(!ret) return false;
    }
    if(s[p] != 'w') return false;
    p++;
    return true;
}

int main(){
    string s;
    cin >> s;
    int p=0, n=s.length();
    if(check(s, p, n) && p==n){
        cout << "Cat" << endl;
    }else{
        cout << "Rabbit" << endl;
    }
    return 0;
}


### Prompt

Generate a CPP solution to the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

bool check(string s, int &p, int n){
    if(p >= n) return true;
    if(s[p] != 'm') return false;
    p++;
    if(s[p] != 'e'){
        bool ret = check(s, p, n);
        if(!ret) return false;
    }
    if(s[p] != 'e') return false;
    p++;
    if(s[p] != 'w'){
        bool ret = check(s, p, n);
        if(!ret) return false;
    }
    if(s[p] != 'w') return false;
    p++;
    return true;
}

int main(){
    string s;
    cin >> s;
    int p=0, n=s.length();
    if(check(s, p, n) && p==n){
        cout << "Cat" << endl;
    }else{
        cout << "Rabbit" << endl;
    }
    return 0;
}


```