#include<iostream>
#include<cstdlib>
#include<cassert>
using namespace std;
string s;
int pos;

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

  return false;
}

int main(){
 
  while(cin >> s){
    pos = 0;
    if(/*rec(0,s.length()-1)*/ (CAT() && pos == s.length()) || s.length() == 0)cout << "Cat" << endl;
    else cout << "Rabbit" << endl;
  }
  return 0;
}
### Prompt

Generate a Cpp solution to the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include<iostream>
#include<cstdlib>
#include<cassert>
using namespace std;
string s;
int pos;

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

  return false;
}

int main(){
 
  while(cin >> s){
    pos = 0;
    if(/*rec(0,s.length()-1)*/ (CAT() && pos == s.length()) || s.length() == 0)cout << "Cat" << endl;
    else cout << "Rabbit" << endl;
  }
  return 0;
}
```