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

#define max(a,b) ((a)>(b)?(a):(b))
#define min(a,b) ((a)<(b)?(a):(b))
#define abs(a) max((a),-(a))
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define repe(i,n) rep(i,(n)+1)
#define per(i,n) for(int i=(int)(n)-1;i>=0;i--)
#define pere(i,n) rep(i,(n)+1)
#define all(x) (x).begin(),(x).end()
#define SP <<" "<<
#define RET return 0
#define MOD 1000000007
#define INF 1000000000000000000

typedef long long LL;
typedef long double LD;

string s;

int solve(int idx){
  if(idx>=s.length()) return -1;
  if(s[idx]!='m') return -1;
  idx++;
  if(idx>=s.length()) return -1;
  if(s[idx]!='e'){
    idx=solve(idx);
    if(idx==-1) return -1;
  }
  if(idx>=s.length()) return -1;
  if(s[idx]!='e') return -1;
  idx++;
  if(idx>=s.length()) return -1;
  if(s[idx]!='w'){
    idx=solve(idx);
    if(idx==-1) return -1;
  }
  if(idx>=s.length()) return -1;
  if(s[idx]!='w') return -1;
  return idx+1;
}

int main(){
  cin >> s;
  if(solve(0)==s.length()) cout << "Cat" << endl;
  else cout << "Rabbit" << endl;
  return 0;
}


### Prompt

Create a solution in CPP for the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

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

#define max(a,b) ((a)>(b)?(a):(b))
#define min(a,b) ((a)<(b)?(a):(b))
#define abs(a) max((a),-(a))
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define repe(i,n) rep(i,(n)+1)
#define per(i,n) for(int i=(int)(n)-1;i>=0;i--)
#define pere(i,n) rep(i,(n)+1)
#define all(x) (x).begin(),(x).end()
#define SP <<" "<<
#define RET return 0
#define MOD 1000000007
#define INF 1000000000000000000

typedef long long LL;
typedef long double LD;

string s;

int solve(int idx){
  if(idx>=s.length()) return -1;
  if(s[idx]!='m') return -1;
  idx++;
  if(idx>=s.length()) return -1;
  if(s[idx]!='e'){
    idx=solve(idx);
    if(idx==-1) return -1;
  }
  if(idx>=s.length()) return -1;
  if(s[idx]!='e') return -1;
  idx++;
  if(idx>=s.length()) return -1;
  if(s[idx]!='w'){
    idx=solve(idx);
    if(idx==-1) return -1;
  }
  if(idx>=s.length()) return -1;
  if(s[idx]!='w') return -1;
  return idx+1;
}

int main(){
  cin >> s;
  if(solve(0)==s.length()) cout << "Cat" << endl;
  else cout << "Rabbit" << endl;
  return 0;
}


```