#include<iostream>
#include<sstream>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<complex>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cassert>

#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(c) (c).begin(),(c).end()
#define mp make_pair
#define pb push_back
#define each(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define dbg(x) cerr<<__LINE__<<": "<<#x<<" = "<<(x)<<endl

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf = (int)1e9;
const double INF = 1e12, EPS = 1e-9;

int dp[510][510];
string in;
bool rec(int s, int t){
	int &res = dp[s][t];
	if(res >= 0) return res;
	if(s == t) return res = 1;
	
	res = 0;
	if(in[s] != 'm' || in[t - 1] != 'w') return res;
	for(int i = s + 1; i < t - 1; i++) if(in[i] == 'e'
		&& rec(s + 1, i) && rec(i + 1, t - 1)) return res = 1;
	return res;
}

int main(){
	cin >> in;
	memset(dp, -1, sizeof(dp));
	cout << (rec(0, in.size()) ? "Cat" : "Rabbit") << endl;
	return 0;
}
### Prompt

Your task is to create a Cpp solution to the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include<iostream>
#include<sstream>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<complex>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cassert>

#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(c) (c).begin(),(c).end()
#define mp make_pair
#define pb push_back
#define each(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define dbg(x) cerr<<__LINE__<<": "<<#x<<" = "<<(x)<<endl

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf = (int)1e9;
const double INF = 1e12, EPS = 1e-9;

int dp[510][510];
string in;
bool rec(int s, int t){
	int &res = dp[s][t];
	if(res >= 0) return res;
	if(s == t) return res = 1;
	
	res = 0;
	if(in[s] != 'm' || in[t - 1] != 'w') return res;
	for(int i = s + 1; i < t - 1; i++) if(in[i] == 'e'
		&& rec(s + 1, i) && rec(i + 1, t - 1)) return res = 1;
	return res;
}

int main(){
	cin >> in;
	memset(dp, -1, sizeof(dp));
	cout << (rec(0, in.size()) ? "Cat" : "Rabbit") << endl;
	return 0;
}
```