#include <iostream>
#include <string>
#include <stack>
#include <algorithm>

using namespace std;

int main() {
    int state = 0;
    string str; cin >> str;
    if(str == "") {
        cout << "Cat" << endl;
        return 0;
    }

    stack<char> stk;
    stk.push('c');
    int i = 0;
    while(i < str.length()) {
        if(stk.empty()) {
            cout << "Rabbit" << endl;
            return 0;
        }
        char c = str[i];
        char e = stk.top();
        stk.pop();
        if(e == 'c' && c == 'm') {
            stk.push('w');
            stk.push('c');
            stk.push('e');
            stk.push('c');
            i++;
        } else if(e == 'e') {
            if(c == 'e') {
                i++;
            } else {
                cout << "Rabbit" << endl;
                return 0;
            }
        } else if(e == 'w') {
            if(c == 'w') {
                i++;
            } else {
                cout << "Rabbit" << endl;
                return 0;
            }
        }
    }
    cout << "Cat" << endl;
    return 0;
}


### Prompt

Generate a cpp solution to the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include <iostream>
#include <string>
#include <stack>
#include <algorithm>

using namespace std;

int main() {
    int state = 0;
    string str; cin >> str;
    if(str == "") {
        cout << "Cat" << endl;
        return 0;
    }

    stack<char> stk;
    stk.push('c');
    int i = 0;
    while(i < str.length()) {
        if(stk.empty()) {
            cout << "Rabbit" << endl;
            return 0;
        }
        char c = str[i];
        char e = stk.top();
        stk.pop();
        if(e == 'c' && c == 'm') {
            stk.push('w');
            stk.push('c');
            stk.push('e');
            stk.push('c');
            i++;
        } else if(e == 'e') {
            if(c == 'e') {
                i++;
            } else {
                cout << "Rabbit" << endl;
                return 0;
            }
        } else if(e == 'w') {
            if(c == 'w') {
                i++;
            } else {
                cout << "Rabbit" << endl;
                return 0;
            }
        }
    }
    cout << "Cat" << endl;
    return 0;
}


```