#include<bits/stdc++.h>
using namespace std;

string s;

bool hoge(){
  int size = s.size();
  stack<char> temp;
  
  for(int i = 0; i < size; i++){//cout<<i<<" "<<temp.size<<endl;
    if(s[i] == 'm'){
      temp.push(s[i]);
    } else if(s[i] == 'e'){
      temp.push(s[i]);
    } else if(s[i] == 'w'){
      if(temp.size() < 2) return false;
      char a = temp.top(); temp.pop();
      char b = temp.top(); temp.pop();
      if(a != 'e' || b != 'm') return false;
    } else return false;
    if(temp.size() == 0 && i != size-1) return false;
  }
  return true;
}

signed main(){

  cin>>s;
  cout<<(hoge()?"Cat":"Rabbit")<<endl;
  return 0;
}


### Prompt

Please create a solution in Cpp to the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include<bits/stdc++.h>
using namespace std;

string s;

bool hoge(){
  int size = s.size();
  stack<char> temp;
  
  for(int i = 0; i < size; i++){//cout<<i<<" "<<temp.size<<endl;
    if(s[i] == 'm'){
      temp.push(s[i]);
    } else if(s[i] == 'e'){
      temp.push(s[i]);
    } else if(s[i] == 'w'){
      if(temp.size() < 2) return false;
      char a = temp.top(); temp.pop();
      char b = temp.top(); temp.pop();
      if(a != 'e' || b != 'm') return false;
    } else return false;
    if(temp.size() == 0 && i != size-1) return false;
  }
  return true;
}

signed main(){

  cin>>s;
  cout<<(hoge()?"Cat":"Rabbit")<<endl;
  return 0;
}


```