#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
using ll = long long;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;


int dp[555][555];
string s;
int rec(int l,int r){
	if(dp[l][r])return dp[l][r];
	if(l==r)return dp[l][r]=1;
	if(s[l]!='m'||s[r-1]!='w')return dp[l][r]=-1;
	REP(i,l,r){
		if(s[i]=='e'&&rec(l+1,i)==1&&rec(i+1,r-1)==1){
			return dp[l][r]=1;
		}
	}
	return dp[l][r]=-1;
}
int main(){
	cin>>s;
	int n=s.size();
	int ret=rec(0,n);
	if(ret==1)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<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
using ll = long long;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;


int dp[555][555];
string s;
int rec(int l,int r){
	if(dp[l][r])return dp[l][r];
	if(l==r)return dp[l][r]=1;
	if(s[l]!='m'||s[r-1]!='w')return dp[l][r]=-1;
	REP(i,l,r){
		if(s[i]=='e'&&rec(l+1,i)==1&&rec(i+1,r-1)==1){
			return dp[l][r]=1;
		}
	}
	return dp[l][r]=-1;
}
int main(){
	cin>>s;
	int n=s.size();
	int ret=rec(0,n);
	if(ret==1)cout<<"Cat"<<endl;
	else cout<<"Rabbit"<<endl;
	return 0;
}

```