#define _USE_MATH_DEFINES
 
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
 
using namespace std;
 
typedef pair<long long int, long long int> P;
long long int INF = 1e18;

string s;
bool flag = true;

int dfs(int i){
	if(s[i] != 'm'){
		return -1;
	}
	++i;
	if(s[i] == 'm'){
		int next = dfs(i);
		if(next == -1){
			return -1;
		}
		i = next;
	}
	if(s[i] == 'e'){
		++i;
	}else{
		return -1;
	}
	if(s[i] == 'm'){
		int next = dfs(i);
		if(next == -1){
			return -1;
		}
		i = next;
	}
	if(s[i] == 'w'){
		++i;
	}else{
		return -1;
	}
	return i;
}

int main(){
	
	cin >> s;
	if(dfs(0) == s.size())
		cout << "Cat" << endl;
	else
		cout << "Rabbit" << endl;
	
	return 0;
}

### Prompt

Please formulate a CPP solution to the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#define _USE_MATH_DEFINES
 
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
 
using namespace std;
 
typedef pair<long long int, long long int> P;
long long int INF = 1e18;

string s;
bool flag = true;

int dfs(int i){
	if(s[i] != 'm'){
		return -1;
	}
	++i;
	if(s[i] == 'm'){
		int next = dfs(i);
		if(next == -1){
			return -1;
		}
		i = next;
	}
	if(s[i] == 'e'){
		++i;
	}else{
		return -1;
	}
	if(s[i] == 'm'){
		int next = dfs(i);
		if(next == -1){
			return -1;
		}
		i = next;
	}
	if(s[i] == 'w'){
		++i;
	}else{
		return -1;
	}
	return i;
}

int main(){
	
	cin >> s;
	if(dfs(0) == s.size())
		cout << "Cat" << endl;
	else
		cout << "Rabbit" << endl;
	
	return 0;
}

```