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

int main() {
    string s, cat1 = "mmewe", cat2 = "emeww";
    cin >> s;
    while(1){
        int pos;
        pos = s.find(cat1);
        if(pos!=s.npos){
            s.replace(pos,cat1.size(),"me");
            continue;
        }
        pos = s.find(cat2);
        if(pos!=s.npos){
            s.replace(pos,cat2.size(),"ew");
            continue;
        }
        break;
    }
    cout << (s=="mew"?"Cat":"Rabbit") << endl;
    return 0;
}

### Prompt

Develop a solution in cpp to the problem described below:

Example

Input

mmemewwemeww


Output

Cat

### Response

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

int main() {
    string s, cat1 = "mmewe", cat2 = "emeww";
    cin >> s;
    while(1){
        int pos;
        pos = s.find(cat1);
        if(pos!=s.npos){
            s.replace(pos,cat1.size(),"me");
            continue;
        }
        pos = s.find(cat2);
        if(pos!=s.npos){
            s.replace(pos,cat2.size(),"ew");
            continue;
        }
        break;
    }
    cout << (s=="mew"?"Cat":"Rabbit") << endl;
    return 0;
}

```