#include <iostream>
#include <stack>
#include <string>

using namespace std;

bool catChecker(string str){

	stack<char> cnt;
	
	for(int i=0;i<str.size();i++){
		char c=str.at(i);
		
		switch(c){
			case 'm':
				cnt.push(c);
				break;
			case 'e':
				if(!cnt.empty() && cnt.top()=='m'){
					cnt.pop();
					cnt.push(c);
				}else	return false;
				break;
			case 'w':
				if(!cnt.empty() && cnt.top()=='e'){
					cnt.pop();
				}else	return false;
				break;
			default:
				return false;
		}
		
		if(cnt.empty()){
			if(i==str.size()-1) return true;
			else return false;
		}
	}

	return false;
}


int main(void){

	string str;

	while(cin>>str)
		if(catChecker(str)) cout << "Cat" << endl;
		else cout << "Rabbit" << endl;

	return 0;
}
### Prompt

In Cpp, your task is to solve the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

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

using namespace std;

bool catChecker(string str){

	stack<char> cnt;
	
	for(int i=0;i<str.size();i++){
		char c=str.at(i);
		
		switch(c){
			case 'm':
				cnt.push(c);
				break;
			case 'e':
				if(!cnt.empty() && cnt.top()=='m'){
					cnt.pop();
					cnt.push(c);
				}else	return false;
				break;
			case 'w':
				if(!cnt.empty() && cnt.top()=='e'){
					cnt.pop();
				}else	return false;
				break;
			default:
				return false;
		}
		
		if(cnt.empty()){
			if(i==str.size()-1) return true;
			else return false;
		}
	}

	return false;
}


int main(void){

	string str;

	while(cin>>str)
		if(catChecker(str)) cout << "Cat" << endl;
		else cout << "Rabbit" << endl;

	return 0;
}
```