#include <iostream>
#include <cstdlib>
using namespace std;
const static int LEN_MAX = 501;

int sy = 0;
int pos = 0;
bool has_error = false;
char line[ LEN_MAX ];
int d = 0;

int get_token() {
  return sy = line[ pos++ ] ;
}

int see_next_token() {
  return line[ pos + 1 ];
}

bool cat() {
  if( sy == '\0' ) { return true; }
  if( sy == 'm' ) {
    get_token();
    if( sy == 'm' ) {
      bool state = cat();
      if( !state ) { return false; }
    }
  }

  if( sy == 'e' ) {
    get_token();
    if( sy == 'm' ) {
      bool state = cat();
      if( !state ) { return false; }
    }
  } else {
    return false;
  }

  if( sy == 'w' ) {
    get_token(); 
  } else {
    return false;
  }
  return true;
}

bool check() {
  if( cat() ) {
    if( sy == '\0') {
      return true;
    }
  }
  return false;
}

int main() {
  cin >> line;
  get_token();
  cout << ( check() ? "Cat" : "Rabbit" ) << endl;

  return EXIT_SUCCESS;
}
### Prompt

Your challenge is to write a CPP solution to the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include <iostream>
#include <cstdlib>
using namespace std;
const static int LEN_MAX = 501;

int sy = 0;
int pos = 0;
bool has_error = false;
char line[ LEN_MAX ];
int d = 0;

int get_token() {
  return sy = line[ pos++ ] ;
}

int see_next_token() {
  return line[ pos + 1 ];
}

bool cat() {
  if( sy == '\0' ) { return true; }
  if( sy == 'm' ) {
    get_token();
    if( sy == 'm' ) {
      bool state = cat();
      if( !state ) { return false; }
    }
  }

  if( sy == 'e' ) {
    get_token();
    if( sy == 'm' ) {
      bool state = cat();
      if( !state ) { return false; }
    }
  } else {
    return false;
  }

  if( sy == 'w' ) {
    get_token(); 
  } else {
    return false;
  }
  return true;
}

bool check() {
  if( cat() ) {
    if( sy == '\0') {
      return true;
    }
  }
  return false;
}

int main() {
  cin >> line;
  get_token();
  cout << ( check() ? "Cat" : "Rabbit" ) << endl;

  return EXIT_SUCCESS;
}
```