#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  int m=0,e=0,ans=1;
  if(s[0]=='m')m++;
  for(int i=1;i<s.size();i++){
    if(s[i]=='m'){
      if(m+e==0)ans=0;
      m++;
    }
    if(s[i]=='e'){
      if(!m)ans=0;
      e++,m--;
    }
    if(s[i]=='w'){
      if(!e)ans=0;
      e--;
    }
  }
  if(ans&&m+e==0)cout<<"Cat"<<endl;
  else cout<<"Rabbit"<<endl;
  return 0;
}
### Prompt

Construct a cpp code solution to the problem outlined:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  int m=0,e=0,ans=1;
  if(s[0]=='m')m++;
  for(int i=1;i<s.size();i++){
    if(s[i]=='m'){
      if(m+e==0)ans=0;
      m++;
    }
    if(s[i]=='e'){
      if(!m)ans=0;
      e++,m--;
    }
    if(s[i]=='w'){
      if(!e)ans=0;
      e--;
    }
  }
  if(ans&&m+e==0)cout<<"Cat"<<endl;
  else cout<<"Rabbit"<<endl;
  return 0;
}
```