// {{{ include
#include <cstdio>
#include <cmath>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <algorithm>
// }}}

using namespace std;

typedef long long ll;
inline int in(){int x;scanf("%d",&x);return x;}

string S;
int memo[512][512];

// [)
bool is_cat(int s, int l){
  if (s == l) return true;
  if (S[s] != 'm' || S[l - 1] != 'w') return false;
  if (memo[s][l] != -1) return memo[s][l];
  for (int ep = s + 1; ep < l - 1; ep++){
    if (S[ep] != 'e') continue;
    if (is_cat(s + 1, ep) && is_cat(ep + 1, l - 1)) return memo[s][l] = true;
  }
  return memo[s][l] = false;
}

int main()
{
  memset(memo, -1, sizeof(memo));
  cin >> S;
  if (is_cat(0, S.size())) puts("Cat");
  else puts("Rabbit");
  return 0;
}
### Prompt

Please formulate a Cpp solution to the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
// {{{ include
#include <cstdio>
#include <cmath>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <algorithm>
// }}}

using namespace std;

typedef long long ll;
inline int in(){int x;scanf("%d",&x);return x;}

string S;
int memo[512][512];

// [)
bool is_cat(int s, int l){
  if (s == l) return true;
  if (S[s] != 'm' || S[l - 1] != 'w') return false;
  if (memo[s][l] != -1) return memo[s][l];
  for (int ep = s + 1; ep < l - 1; ep++){
    if (S[ep] != 'e') continue;
    if (is_cat(s + 1, ep) && is_cat(ep + 1, l - 1)) return memo[s][l] = true;
  }
  return memo[s][l] = false;
}

int main()
{
  memset(memo, -1, sizeof(memo));
  cin >> S;
  if (is_cat(0, S.size())) puts("Cat");
  else puts("Rabbit");
  return 0;
}
```