#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <tuple>
#include <queue>
#include <set>
#include <cstdio>
#include <climits>
#include <cmath>
#include <array>
#include <functional>
#include <list>
#include <iomanip>
#include <set>
const int MOD=1000000007;
const int INF=1000000000;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
const double eps=1e-9;
const int inf=1e9;
typedef pair<int,int> P;

int dp[505][505];
string s;
typedef pair<int,int> P;
#define T 1
#define F 0

bool dfs(int l,int r)
{
  int &ret=dp[l][r];
  if(ret>=0) return ret;
  if(r-l==0) return ret=T;
  if(s[l]!='m' || s[r-1]!= 'w') return ret=F;
  ret=F;
  for(int m=l+1;m<r-1;m++)
    {
      if(s[m]=='e')
	{
	  if(dfs(l+1,m) && dfs(m+1,r-1))
	    {
	      return ret=T;
	    }
	}
    }
  return ret;
}
int main(int argc,char const* argv[])
{
  cin >> s;
  memset(dp,-1,sizeof(dp));
  if(dfs(0,s.size())) cout << "Cat" << endl;
  else cout << "Rabbit" << endl;
  return 0;
}


### Prompt

Please formulate a CPP solution to the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <tuple>
#include <queue>
#include <set>
#include <cstdio>
#include <climits>
#include <cmath>
#include <array>
#include <functional>
#include <list>
#include <iomanip>
#include <set>
const int MOD=1000000007;
const int INF=1000000000;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
const double eps=1e-9;
const int inf=1e9;
typedef pair<int,int> P;

int dp[505][505];
string s;
typedef pair<int,int> P;
#define T 1
#define F 0

bool dfs(int l,int r)
{
  int &ret=dp[l][r];
  if(ret>=0) return ret;
  if(r-l==0) return ret=T;
  if(s[l]!='m' || s[r-1]!= 'w') return ret=F;
  ret=F;
  for(int m=l+1;m<r-1;m++)
    {
      if(s[m]=='e')
	{
	  if(dfs(l+1,m) && dfs(m+1,r-1))
	    {
	      return ret=T;
	    }
	}
    }
  return ret;
}
int main(int argc,char const* argv[])
{
  cin >> s;
  memset(dp,-1,sizeof(dp));
  if(dfs(0,s.size())) cout << "Cat" << endl;
  else cout << "Rabbit" << endl;
  return 0;
}


```