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

int main() {
  string s;
  cin >> s;
  bool r = true;
  stack<bool> t;
  int i;
  for (i = 0; i < s.size(); i++) {
    if (s[i] == 'm') {
      t.push(false);
    } else if (s[i] == 'e') {
      if (!t.empty() && !t.top()) {
        t.pop();
        t.push(true);
      } else {
        r = false;
        break;
      }
    } else if (s[i] == 'w') {
      if (!t.empty() && t.top()) {
        t.pop();
        if (t.empty() && i < s.size() - 1) {
          r = false;
          break;
        }
      } else {
        r = false;
        break;
      }
    }
  }
  cout << (r ? "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 main() {
  string s;
  cin >> s;
  bool r = true;
  stack<bool> t;
  int i;
  for (i = 0; i < s.size(); i++) {
    if (s[i] == 'm') {
      t.push(false);
    } else if (s[i] == 'e') {
      if (!t.empty() && !t.top()) {
        t.pop();
        t.push(true);
      } else {
        r = false;
        break;
      }
    } else if (s[i] == 'w') {
      if (!t.empty() && t.top()) {
        t.pop();
        if (t.empty() && i < s.size() - 1) {
          r = false;
          break;
        }
      } else {
        r = false;
        break;
      }
    }
  }
  cout << (r ? "Cat" : "Rabbit") << endl;
  return 0;
}


```