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


signed main(){
    ios::sync_with_stdio(false);
	cin.tie(0);

    string s;
    cin>>s;
    int m=0,e=0,w=0;
    int n=s.size();
    bool mid=false;
    bool end=false;
    for(int i=0;i<n;i++){
        if(s[i]=='m') m++;
        else if(s[i]=='e'){
            e++;
            if(m<e){
                cout<<"Rabbit"<<endl;
                return 0;
            }
            if(m==e && mid==false){
                mid=true;
            }
            
        }
        else if(s[i]=='w'){
            w++;
            if(m<w || e<w){
                cout<<"Rabbit"<<endl;
                return 0;
            }
            if(w==m && i!=n-1){
                cout<<"Rabbit"<<endl;
                return 0;
            }
        }
    }
    if(mid) cout<<"Cat"<<endl;
    else cout<<"Rabbit"<<endl;

}

### Prompt

In cpp, your task is to solve the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

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


signed main(){
    ios::sync_with_stdio(false);
	cin.tie(0);

    string s;
    cin>>s;
    int m=0,e=0,w=0;
    int n=s.size();
    bool mid=false;
    bool end=false;
    for(int i=0;i<n;i++){
        if(s[i]=='m') m++;
        else if(s[i]=='e'){
            e++;
            if(m<e){
                cout<<"Rabbit"<<endl;
                return 0;
            }
            if(m==e && mid==false){
                mid=true;
            }
            
        }
        else if(s[i]=='w'){
            w++;
            if(m<w || e<w){
                cout<<"Rabbit"<<endl;
                return 0;
            }
            if(w==m && i!=n-1){
                cout<<"Rabbit"<<endl;
                return 0;
            }
        }
    }
    if(mid) cout<<"Cat"<<endl;
    else cout<<"Rabbit"<<endl;

}

```