/*
 * 2369.cc: CatChecker
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const int MAX_N = 500;

/* typedef */

/* global variables */

/* subroutines */

bool dp[MAX_N][MAX_N + 1];

/* main */

int main() {
  string s;
  cin >> s;
  int n = s.size();

  for (int i = 0; i < n; i++) dp[i][i] = true;

  for (int l = 3; l <= n; l++)
    for (int i = 0, j = l - 1; j < n; i++, j++)
      if (s[i] == 'm' && s[j] == 'w')
	for (int k = i + 1; k < j; k++)
	  if (s[k] == 'e' && dp[i + 1][k] && dp[k + 1][j])
	    dp[i][j + 1] = true;

  cout << (dp[0][n] ? "Cat" : "Rabbit") << endl;
  return 0;
}
### Prompt

Develop a solution in Cpp to the problem described below:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
/*
 * 2369.cc: CatChecker
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const int MAX_N = 500;

/* typedef */

/* global variables */

/* subroutines */

bool dp[MAX_N][MAX_N + 1];

/* main */

int main() {
  string s;
  cin >> s;
  int n = s.size();

  for (int i = 0; i < n; i++) dp[i][i] = true;

  for (int l = 3; l <= n; l++)
    for (int i = 0, j = l - 1; j < n; i++, j++)
      if (s[i] == 'm' && s[j] == 'w')
	for (int k = i + 1; k < j; k++)
	  if (s[k] == 'e' && dp[i + 1][k] && dp[k + 1][j])
	    dp[i][j + 1] = true;

  cout << (dp[0][n] ? "Cat" : "Rabbit") << endl;
  return 0;
}
```