// AOJ 2369
#include<iostream>
using namespace std;

string code;
char tok;
bool flag;

char car(string s) {
  return (s.empty() ? '.':s[0]);
}

string cdr(string s) {
  return (s.empty() ? "":s.substr(1));
}

void advance() {
  tok = car(code);
  code = cdr(code);
}

void eat(char c) {
  if (tok == c) {
    advance();
  } else {
    flag = true;
  }
}

void Cat() {
  if (tok == 'm') {
    eat('m');
    Cat();
    eat('e');
    Cat();
    eat('w');
  } else {
  }
}

void Eof() {
  eat('.');
}

void Z() {
  Cat(); Eof();
}

int main() {
  cin >> code;
  code.push_back('.');
  advance();
  
  Z();

  cout << (flag ? "Rabbit":"Cat") << endl;
}
### Prompt

Create a solution in cpp for the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
// AOJ 2369
#include<iostream>
using namespace std;

string code;
char tok;
bool flag;

char car(string s) {
  return (s.empty() ? '.':s[0]);
}

string cdr(string s) {
  return (s.empty() ? "":s.substr(1));
}

void advance() {
  tok = car(code);
  code = cdr(code);
}

void eat(char c) {
  if (tok == c) {
    advance();
  } else {
    flag = true;
  }
}

void Cat() {
  if (tok == 'm') {
    eat('m');
    Cat();
    eat('e');
    Cat();
    eat('w');
  } else {
  }
}

void Eof() {
  eat('.');
}

void Z() {
  Cat(); Eof();
}

int main() {
  cin >> code;
  code.push_back('.');
  advance();
  
  Z();

  cout << (flag ? "Rabbit":"Cat") << endl;
}
```