#include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = uint32_t;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max() / 32 * 15 + 208;

int main() {
    string s;
    cin >> s;
    int n = s.size();
    vector<vector<int>> dp(n, vector<int> (n+1, 0));
    for (int i = 0; i < n; ++i) {
        dp[i][i] = 1;
    }
    for (int len = 3; len <= n; len += 3) {
        for (int i = 0; i+len <= n; ++i) {
            int k = i+len;
            if(s[i] == 'm' && s[k-1] == 'w'){
                for (int j = i+1; j < k-1; ++j) {
                    if(s[j] == 'e'){
                        dp[i][k] |= (dp[i+1][j] & dp[j+1][k-1]);
                    }
                }
            }
        }
    }
    puts(dp[0][n] ? "Cat" : "Rabbit");
    return 0;
}

### Prompt

Please provide a CPP coded solution to the problem described below:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = uint32_t;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max() / 32 * 15 + 208;

int main() {
    string s;
    cin >> s;
    int n = s.size();
    vector<vector<int>> dp(n, vector<int> (n+1, 0));
    for (int i = 0; i < n; ++i) {
        dp[i][i] = 1;
    }
    for (int len = 3; len <= n; len += 3) {
        for (int i = 0; i+len <= n; ++i) {
            int k = i+len;
            if(s[i] == 'm' && s[k-1] == 'w'){
                for (int j = i+1; j < k-1; ++j) {
                    if(s[j] == 'e'){
                        dp[i][k] |= (dp[i+1][j] & dp[j+1][k-1]);
                    }
                }
            }
        }
    }
    puts(dp[0][n] ? "Cat" : "Rabbit");
    return 0;
}

```