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

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

    bool iscat = true;
    for(int i=0; i<(int)str.length()-1; i++){
        if((str[i]=='m' && str[i+1]=='w')
           || (str[i]=='e' && str[i+1]=='e')
           || (str[i]=='w' && str[i+1]=='m')){
            iscat=false;
            break;
        }
    }

    int cm=0, ce=0, cw=0;
    for(int i=0; i<(int)str.length(); i++){
        if(str[i]=='m') cm++;
        if(str[i]=='e') ce++;
        if(str[i]=='w') cw++;
        if(cm<ce || cm<cw || ce<cw){
            iscat=false;
            break;
        }
    }
    if(cm!=ce || cm!=cw){
        iscat=false;
    }
    
    if(iscat){
        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 <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;

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

    bool iscat = true;
    for(int i=0; i<(int)str.length()-1; i++){
        if((str[i]=='m' && str[i+1]=='w')
           || (str[i]=='e' && str[i+1]=='e')
           || (str[i]=='w' && str[i+1]=='m')){
            iscat=false;
            break;
        }
    }

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