#include <iostream>
using namespace std;

int main(){
    string s;
    cin >> s;

    s += "0";
    bool iscat = true;
    int cm=0, ce=0, cw=0;
    for(int i=0; i<(int)s.length(); i++){
        if(s[i]=='m') cm++;
        if(s[i]=='e') ce++;
        if(s[i]=='w') cw++;
        if(cm<ce || cm<cw || ce<cw){
            iscat=false;
            break;
        }
        if((s[i]=='m' && s[i+1]=='w')
           || (s[i]=='e' && s[i+1]=='e')
           || (s[i]=='w' && s[i+1]=='m')){
            iscat=false;
            break;
        }
    }
    if(cm!=ce || cm!=cw){
        iscat=false;
    }
    
    if(iscat){
        cout << "Cat" << endl;
    }else{
        cout << "Rabbit" << endl;
    }
    return 0;
}
### Prompt

Please create a solution in Cpp to the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

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

int main(){
    string s;
    cin >> s;

    s += "0";
    bool iscat = true;
    int cm=0, ce=0, cw=0;
    for(int i=0; i<(int)s.length(); i++){
        if(s[i]=='m') cm++;
        if(s[i]=='e') ce++;
        if(s[i]=='w') cw++;
        if(cm<ce || cm<cw || ce<cw){
            iscat=false;
            break;
        }
        if((s[i]=='m' && s[i+1]=='w')
           || (s[i]=='e' && s[i+1]=='e')
           || (s[i]=='w' && s[i+1]=='m')){
            iscat=false;
            break;
        }
    }
    if(cm!=ce || cm!=cw){
        iscat=false;
    }
    
    if(iscat){
        cout << "Cat" << endl;
    }else{
        cout << "Rabbit" << endl;
    }
    return 0;
}
```