#include <string>
#include <vector>
#include <iostream>

using namespace std;

int main()
{
	string S; cin >> S;

	vector<char> stack1;

	for (int i = 0; i < S.size(); i++)
	{
		if (i != 0 && stack1.empty())
		{
			goto Rabbit;
		}

		stack1.push_back(S[i]);

		if (stack1.size() >= 3)
		{
			int end = stack1.size() - 1;

			if (stack1[end - 2] == 'm' && stack1[end - 1] == 'e' && stack1[end] == 'w')
			{
				stack1.pop_back();
				stack1.pop_back();
				stack1.pop_back();
			}
		}
	}

	if (stack1.size() == 0)
	{
		goto Cat;
	}

Rabbit:;

	cout << "Rabbit" << endl; goto Exit;

Cat:;

	cout << "Cat" << endl;

Exit:;

	return 0;
}
### Prompt

Please formulate a CPP solution to the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

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

using namespace std;

int main()
{
	string S; cin >> S;

	vector<char> stack1;

	for (int i = 0; i < S.size(); i++)
	{
		if (i != 0 && stack1.empty())
		{
			goto Rabbit;
		}

		stack1.push_back(S[i]);

		if (stack1.size() >= 3)
		{
			int end = stack1.size() - 1;

			if (stack1[end - 2] == 'm' && stack1[end - 1] == 'e' && stack1[end] == 'w')
			{
				stack1.pop_back();
				stack1.pop_back();
				stack1.pop_back();
			}
		}
	}

	if (stack1.size() == 0)
	{
		goto Cat;
	}

Rabbit:;

	cout << "Rabbit" << endl; goto Exit;

Cat:;

	cout << "Cat" << endl;

Exit:;

	return 0;
}
```