#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <utility>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <cmath>
#include <queue>
#include <map>
using namespace std;
typedef long long ll;
const int INF = 1<<30; 
const int MOD = 1e9 + 7;
const int dy[] = {1, 0, -1, 0};
const int dx[] = {0, 1, 0, -1};
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    string s;
    cin >> s;
    bool ok = true;
    if(s[0] != 'm') ok = false;
    if(s.back() != 'w') ok = false;
    while(1)
    {
        string t = "";
        for(int i = 0; i < s.size(); i++)
        {
            if(i + 3 != s.size() && i != 0 && s.substr(i, 3) == "mew")
            {
                i += 2;
            }
            else
            {
                t += s[i];
            }
        }
        if(t == "mew") break;
        if(t == s)
        {
            ok = false; //変化なし
            break;
        }
        s = t;
    }
    cout << (ok ? "Cat" : "Rabbit") << endl;
    return 0;
}


### Prompt

Construct a CPP code solution to the problem outlined:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <utility>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <cmath>
#include <queue>
#include <map>
using namespace std;
typedef long long ll;
const int INF = 1<<30; 
const int MOD = 1e9 + 7;
const int dy[] = {1, 0, -1, 0};
const int dx[] = {0, 1, 0, -1};
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    string s;
    cin >> s;
    bool ok = true;
    if(s[0] != 'm') ok = false;
    if(s.back() != 'w') ok = false;
    while(1)
    {
        string t = "";
        for(int i = 0; i < s.size(); i++)
        {
            if(i + 3 != s.size() && i != 0 && s.substr(i, 3) == "mew")
            {
                i += 2;
            }
            else
            {
                t += s[i];
            }
        }
        if(t == "mew") break;
        if(t == s)
        {
            ok = false; //変化なし
            break;
        }
        s = t;
    }
    cout << (ok ? "Cat" : "Rabbit") << endl;
    return 0;
}


```