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

string s;
int pos=0;

bool cat(){
  if(s[pos]=='m'){
    pos++;
    if(s[pos]=='m' && !cat())return false;
    if(s[pos]!='e')return false;
    pos++;
    if(s[pos]=='m' && !cat())return false;
    if(s[pos]!='w')return false;
    else{
      pos++;
      return true;
    }
  }
  return false;
}

int main(){
  cin>>s;
  if(cat() && s.length()==pos)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;

string s;
int pos=0;

bool cat(){
  if(s[pos]=='m'){
    pos++;
    if(s[pos]=='m' && !cat())return false;
    if(s[pos]!='e')return false;
    pos++;
    if(s[pos]=='m' && !cat())return false;
    if(s[pos]!='w')return false;
    else{
      pos++;
      return true;
    }
  }
  return false;
}

int main(){
  cin>>s;
  if(cat() && s.length()==pos)cout<<"Cat"<<endl;
  else cout<<"Rabbit"<<endl;
  return 0;
}
```