#include <cstdio>
#include <cstring>

using namespace std;

int main()
{
	char s[1024], t[1024];
	
	scanf("%s", s);
	
	while (1){
		int len = strlen(s);
		bool update = false;
		for (int i = 1; i + 2 <= len - 2; i++){
			if (strncmp(&s[i], "mew", 3) == 0){
				update = true;
				int idx = 0;
				for (int j = 0; j < i; j++){
					t[idx++] = s[j];
				}
				for (int j = i + 3; j < len; j++){
					t[idx++] = s[j];
				}
				t[idx] = 0;
				break;
			}
		}
		if (!update){
			return (!printf("%s\n", strcmp(s, "mew") ? "Rabbit" : "Cat"));
		}
		strcpy(s, t);
	}
}
### Prompt

Please formulate a CPP solution to the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include <cstdio>
#include <cstring>

using namespace std;

int main()
{
	char s[1024], t[1024];
	
	scanf("%s", s);
	
	while (1){
		int len = strlen(s);
		bool update = false;
		for (int i = 1; i + 2 <= len - 2; i++){
			if (strncmp(&s[i], "mew", 3) == 0){
				update = true;
				int idx = 0;
				for (int j = 0; j < i; j++){
					t[idx++] = s[j];
				}
				for (int j = i + 3; j < len; j++){
					t[idx++] = s[j];
				}
				t[idx] = 0;
				break;
			}
		}
		if (!update){
			return (!printf("%s\n", strcmp(s, "mew") ? "Rabbit" : "Cat"));
		}
		strcpy(s, t);
	}
}
```