#include<iostream>
#include<string>
#include<cmath>
#include<cctype>
#include<cstdlib>

using namespace std;

int i;
string str;

bool dfs()
{
	bool flag = true;
	if(str[i] == 'm')
		i++;
	else 
		return false;
	
	
	if(str[i] == 'm')
		flag = dfs();
	if(str[i] == 'e')
		i++;
	else
		return false;
	
	if(!flag)return false;
	
	if(str[i] == 'm')
		flag = dfs();
	if(str[i] == 'w')
		i++;
	else
		return false;
	
	if(!flag)return false;
	
	return true;
	
}

int main()
{
	cin >> str;
	i = 0;
	if(dfs() && str[i] == '\0')cout << "Cat" << endl;
	else cout << "Rabbit" << endl;
	
	return 0;
}
### Prompt

Please provide a CPP coded solution to the problem described below:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include<iostream>
#include<string>
#include<cmath>
#include<cctype>
#include<cstdlib>

using namespace std;

int i;
string str;

bool dfs()
{
	bool flag = true;
	if(str[i] == 'm')
		i++;
	else 
		return false;
	
	
	if(str[i] == 'm')
		flag = dfs();
	if(str[i] == 'e')
		i++;
	else
		return false;
	
	if(!flag)return false;
	
	if(str[i] == 'm')
		flag = dfs();
	if(str[i] == 'w')
		i++;
	else
		return false;
	
	if(!flag)return false;
	
	return true;
	
}

int main()
{
	cin >> str;
	i = 0;
	if(dfs() && str[i] == '\0')cout << "Cat" << endl;
	else cout << "Rabbit" << endl;
	
	return 0;
}
```