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

using namespace std;

void catChecker(string str){

	stack<char> cnt;

	for(int i=0;i<str.size();i++){
		char c=str.at(i);
		
		if(c=='m'){
			cnt.push(c);
		}else if(!cnt.empty()){
			if(c=='e' && cnt.top()=='m'){
				cnt.pop();
				cnt.push(c);
			}else if(c=='w' && cnt.top()=='e'){
				cnt.pop();
			}else{
				cout << "Rabbit" << endl;
				return ;
			}
		}else{
			cout << "Rabbit" << endl;
			return ;
		}
	
		
		if(i<str.size()-1 && cnt.empty()){
			cout << "Rabbit" << endl;
			return ;
		}
	}
	if(cnt.empty()){
		cout << "Cat" << endl;
	}else{
		cout << "Rabbit" << endl;
	}
	return ;
}

int main(void){

	string str;

	while(cin>>str)
		catChecker(str);

	return 0;
}
### Prompt

Please create a solution in Cpp to the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

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

using namespace std;

void catChecker(string str){

	stack<char> cnt;

	for(int i=0;i<str.size();i++){
		char c=str.at(i);
		
		if(c=='m'){
			cnt.push(c);
		}else if(!cnt.empty()){
			if(c=='e' && cnt.top()=='m'){
				cnt.pop();
				cnt.push(c);
			}else if(c=='w' && cnt.top()=='e'){
				cnt.pop();
			}else{
				cout << "Rabbit" << endl;
				return ;
			}
		}else{
			cout << "Rabbit" << endl;
			return ;
		}
	
		
		if(i<str.size()-1 && cnt.empty()){
			cout << "Rabbit" << endl;
			return ;
		}
	}
	if(cnt.empty()){
		cout << "Cat" << endl;
	}else{
		cout << "Rabbit" << endl;
	}
	return ;
}

int main(void){

	string str;

	while(cin>>str)
		catChecker(str);

	return 0;
}
```