#include<iostream>
#include<algorithm>
#include<string>

using namespace std;
bool cat[1080][1080];
string s;
int main(){
	cin >> s;
	int len = s.size();
	for(int i = 0;i <= len;i++){
		for(int l = 0;l + i <= len;l++){
			int r = l + i;
			if(i == 0){
				cat[l][r] = true;
				continue;
			}
			if(s[l] != 'm' || s[r-1] != 'w')continue;
			for(int e = l+1;e < r-1;e++){
				if(s[e] != 'e')continue;
				if(cat[l+1][e] && cat[e+1][r-1]){
					cat[l][r] = true;
					break;
				}
			}
		}
	}
	if(cat[0][len])cout << "Cat" << endl;
	else cout << "Rabbit" << endl;
	return 0;
}

### Prompt

Develop a solution in CPP to the problem described below:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include<iostream>
#include<algorithm>
#include<string>

using namespace std;
bool cat[1080][1080];
string s;
int main(){
	cin >> s;
	int len = s.size();
	for(int i = 0;i <= len;i++){
		for(int l = 0;l + i <= len;l++){
			int r = l + i;
			if(i == 0){
				cat[l][r] = true;
				continue;
			}
			if(s[l] != 'm' || s[r-1] != 'w')continue;
			for(int e = l+1;e < r-1;e++){
				if(s[e] != 'e')continue;
				if(cat[l+1][e] && cat[e+1][r-1]){
					cat[l][r] = true;
					break;
				}
			}
		}
	}
	if(cat[0][len])cout << "Cat" << endl;
	else cout << "Rabbit" << endl;
	return 0;
}

```