#include <iostream>
#include <string>

using namespace std;

bool parse(const string& s, int& idx){
	if(idx >= s.size()) return true;
	if(s[idx++]!='m') return false;
	if(idx >= s.size()) return false;
	if(s[idx]=='e'){
		++idx;
	} else {
		if(!parse(s, idx)) return false;
		if(idx >= s.size() || s[idx++] != 'e') return false;
	}
	if(idx >= s.size()) return false;
	if(s[idx]=='w'){
		++idx;
	} else {
		if(!parse(s, idx)) return false;
		if(idx >= s.size() || s[idx++] != 'w') return false;
	}
	return true;
}

int main(){
	string s;
	while(cin >> s){
		int idx = 0;
		bool ok = parse(s, idx);
		cout << (ok && idx == s.size() ? "Cat" : "Rabbit") << endl;
	}
}
### Prompt

Your challenge is to write a CPP solution to the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

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

using namespace std;

bool parse(const string& s, int& idx){
	if(idx >= s.size()) return true;
	if(s[idx++]!='m') return false;
	if(idx >= s.size()) return false;
	if(s[idx]=='e'){
		++idx;
	} else {
		if(!parse(s, idx)) return false;
		if(idx >= s.size() || s[idx++] != 'e') return false;
	}
	if(idx >= s.size()) return false;
	if(s[idx]=='w'){
		++idx;
	} else {
		if(!parse(s, idx)) return false;
		if(idx >= s.size() || s[idx++] != 'w') return false;
	}
	return true;
}

int main(){
	string s;
	while(cin >> s){
		int idx = 0;
		bool ok = parse(s, idx);
		cout << (ok && idx == s.size() ? "Cat" : "Rabbit") << endl;
	}
}
```