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

int p=0;

int cat(string &s){
  if(p==s.size()) return p;
  if(s[p]!='m'){
    return p;
  }
  int prep=p;
  p++;
  cat(s);
  if(p==s.size() || s[p]!='e') return p=prep;
  p++;
  cat(s);
  if(p==s.size() || s[p]!='w') return p=prep;
  p++;
  return p;
}

int main(){
  string s;
  cin>>s;
  cout<<(cat(s)==s.size() ? "Cat" : "Rabbit")<<endl;
  return 0;
}
### Prompt

Generate a Cpp solution to the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

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

int p=0;

int cat(string &s){
  if(p==s.size()) return p;
  if(s[p]!='m'){
    return p;
  }
  int prep=p;
  p++;
  cat(s);
  if(p==s.size() || s[p]!='e') return p=prep;
  p++;
  cat(s);
  if(p==s.size() || s[p]!='w') return p=prep;
  p++;
  return p;
}

int main(){
  string s;
  cin>>s;
  cout<<(cat(s)==s.size() ? "Cat" : "Rabbit")<<endl;
  return 0;
}
```