#include <string>
#include <iostream>
using namespace std;

string s;

int check(int index){
	if(index >= s.length() - 2 || s[index] != 'm') return -1;
	if(s[index + 1] == 'e') index++;
	else index = check(index + 1);
	if(index == -1 || index >= s.length() - 1 || s[index] != 'e') return -1;
	if(s[index + 1] == 'w') index++;
	else index = check(index + 1);
	if(index == -1 || index >= s.length() || s[index] != 'w') return -1;
	return index + 1;
}

int main(){
	cin >> s;
	int pos = check(0);
	if(pos == -1 || pos != s.length()) cout << "Rabbit" << endl;
	else cout << "Cat" << endl;
	return 0;
}
### Prompt

Please create a solution in cpp to the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include <string>
#include <iostream>
using namespace std;

string s;

int check(int index){
	if(index >= s.length() - 2 || s[index] != 'm') return -1;
	if(s[index + 1] == 'e') index++;
	else index = check(index + 1);
	if(index == -1 || index >= s.length() - 1 || s[index] != 'e') return -1;
	if(s[index + 1] == 'w') index++;
	else index = check(index + 1);
	if(index == -1 || index >= s.length() || s[index] != 'w') return -1;
	return index + 1;
}

int main(){
	cin >> s;
	int pos = check(0);
	if(pos == -1 || pos != s.length()) cout << "Rabbit" << endl;
	else cout << "Cat" << endl;
	return 0;
}
```