#include <iostream>
#define REP(i, a, n) for(int i = ((int) a); i < ((int) n); i++)
using namespace std;

string S;
int p = 0;

bool cat() {
  if(S[p] == 'm') {
    p++;
    if(!cat()) return false;
    if(S[p++] != 'e') return false;
    if(!cat()) return false;
    if(S[p++] != 'w') return false;
  }
  return true;
}

int main(void) {
  cin >> S;
  cout << (cat() && p == S.length() ? "Cat" : "Rabbit") << endl;
  return 0;
}
### Prompt

Create a solution in CPP for the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include <iostream>
#define REP(i, a, n) for(int i = ((int) a); i < ((int) n); i++)
using namespace std;

string S;
int p = 0;

bool cat() {
  if(S[p] == 'm') {
    p++;
    if(!cat()) return false;
    if(S[p++] != 'e') return false;
    if(!cat()) return false;
    if(S[p++] != 'w') return false;
  }
  return true;
}

int main(void) {
  cin >> S;
  cout << (cat() && p == S.length() ? "Cat" : "Rabbit") << endl;
  return 0;
}
```