#include <bits/stdc++.h>

using namespace std;

#define FOR(i,s,e) for(int (i)=(s);(i)<(int)(e);(i)++)
#define REP(i,e) FOR(i,0,e)
#define RFOR(i,e,s) for(int (i)=(e)-1;(i)>=(int)(s);(i)--)
#define RREP(i,e) RFOR(i,e,0)

#define all(o) (o).begin(), (o).end()
#define psb(x) push_back(x)
#define mp(x,y) make_pair((x),(y))

typedef long long ll;
typedef pair<int, int> PII;
typedef priority_queue<int> PQI;
typedef priority_queue<PII> PQII;

const double EPS = 1e-10;

map<string, int> d;

int is_cat(string s) {
  if (s.empty()) return 1;
  if (d.find(s) != d.end()) return d[s];
  int n = (int)s.size();
  if (s[0]!='m' || s[n-1]!='w') return 0;
  FOR(i,1,n-1) if (s[i] == 'e') {
    if (is_cat(s.substr(1,i-1)) && is_cat(s.substr(i+1,n-1-(i+1))))
      return d[s] = 1;
  }
  return d[s] = 0;
}

int main() {
  string s;
  cin >> s;
  if (is_cat(s))
    cout << "Cat" << endl;
  else
    cout << "Rabbit" << endl;

  return 0;
}
### Prompt

Construct a cpp code solution to the problem outlined:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include <bits/stdc++.h>

using namespace std;

#define FOR(i,s,e) for(int (i)=(s);(i)<(int)(e);(i)++)
#define REP(i,e) FOR(i,0,e)
#define RFOR(i,e,s) for(int (i)=(e)-1;(i)>=(int)(s);(i)--)
#define RREP(i,e) RFOR(i,e,0)

#define all(o) (o).begin(), (o).end()
#define psb(x) push_back(x)
#define mp(x,y) make_pair((x),(y))

typedef long long ll;
typedef pair<int, int> PII;
typedef priority_queue<int> PQI;
typedef priority_queue<PII> PQII;

const double EPS = 1e-10;

map<string, int> d;

int is_cat(string s) {
  if (s.empty()) return 1;
  if (d.find(s) != d.end()) return d[s];
  int n = (int)s.size();
  if (s[0]!='m' || s[n-1]!='w') return 0;
  FOR(i,1,n-1) if (s[i] == 'e') {
    if (is_cat(s.substr(1,i-1)) && is_cat(s.substr(i+1,n-1-(i+1))))
      return d[s] = 1;
  }
  return d[s] = 0;
}

int main() {
  string s;
  cin >> s;
  if (is_cat(s))
    cout << "Cat" << endl;
  else
    cout << "Rabbit" << endl;

  return 0;
}
```