#include <string>
#include <iostream>

using namespace std;

bool is_cat(string::const_iterator &begin, string::const_iterator end) {
	if (begin == end) {
		return true;
	}
	// empty
	if (*begin != 'm') {
		return true;
	}
	begin++;
	if (!is_cat(begin, end)) {
		return false;
	}
	if (begin == end || *begin != 'e') {
		return false;
	}
	begin++;
	if (!is_cat(begin, end)) {
		return false;
	}
	if (begin == end || *begin != 'w') {
		return false;
	}
	begin++;
	return true;
}

int main() {
	string line;
	getline(cin, line);
	auto begin = line.cbegin();
	if (is_cat(begin, line.cend()) && begin == line.cend()) {
		cout << "Cat" << endl;
	}
	else {
		cout << "Rabbit" << endl;
	}
}
### Prompt

Generate a cpp solution to the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

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

using namespace std;

bool is_cat(string::const_iterator &begin, string::const_iterator end) {
	if (begin == end) {
		return true;
	}
	// empty
	if (*begin != 'm') {
		return true;
	}
	begin++;
	if (!is_cat(begin, end)) {
		return false;
	}
	if (begin == end || *begin != 'e') {
		return false;
	}
	begin++;
	if (!is_cat(begin, end)) {
		return false;
	}
	if (begin == end || *begin != 'w') {
		return false;
	}
	begin++;
	return true;
}

int main() {
	string line;
	getline(cin, line);
	auto begin = line.cbegin();
	if (is_cat(begin, line.cend()) && begin == line.cend()) {
		cout << "Cat" << endl;
	}
	else {
		cout << "Rabbit" << endl;
	}
}
```