#include <bits/stdc++.h>

using namespace std;

#define rep(i, n) REP(i, 0, n)
#define REP(i, a, n) for(int i=(a); i<(n); i++)

string s;
int dp[510][510];

bool dfs(int l, int r) {
    int& ret = dp[l][r];
    if(ret >= 0) return ret;
    if(l == r) return ret = 1;
    if(s[l]!='m' || s[r-1]!='w') return ret = 0;
    ret = 0;
    REP(m, l+1, r-1) if(s[m] == 'e' && dfs(l+1, m) && dfs(m+1, r-1)) return ret = 1;
    return ret;
}

int main() {
	cin >> s;
	memset(dp, -1, sizeof(dp));
    cout << (dfs(0, s.size())? "Cat":"Rabbit") << endl; 
}


### Prompt

Your task is to create a CPP solution to the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include <bits/stdc++.h>

using namespace std;

#define rep(i, n) REP(i, 0, n)
#define REP(i, a, n) for(int i=(a); i<(n); i++)

string s;
int dp[510][510];

bool dfs(int l, int r) {
    int& ret = dp[l][r];
    if(ret >= 0) return ret;
    if(l == r) return ret = 1;
    if(s[l]!='m' || s[r-1]!='w') return ret = 0;
    ret = 0;
    REP(m, l+1, r-1) if(s[m] == 'e' && dfs(l+1, m) && dfs(m+1, r-1)) return ret = 1;
    return ret;
}

int main() {
	cin >> s;
	memset(dp, -1, sizeof(dp));
    cout << (dfs(0, s.size())? "Cat":"Rabbit") << endl; 
}


```