#include <bits/stdc++.h>
using namespace std;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}
using Int = long long;
const char newl = '\n';

//INSERT ABOVE HERE
Int dp[505][505];

signed main(){
  cin.tie(0);
  ios::sync_with_stdio(0);

  string s;
  cin>>s;
  Int n=s.size();
  if(n%3){
    cout<<"Rabbit"<<newl;
    return 0;
  }

  memset(dp,0,sizeof(dp));
  for(Int i=0;i<=n;i++) dp[i][i]=1;

  for(Int w=3;w<=n;w+=3){
    for(Int l=0;l+w<=n;l++){
      Int r=l+w-1;
      if(s[l]!='m') continue;
      if(s[r]!='w') continue;
      for(Int m=l+1;m<r;m++){
        if(s[m]!='e') continue;
        dp[l][l+w]|=dp[l+1][m] and dp[m+1][r];
      }
    }
  }

  cout<<(dp[0][n]?"Cat":"Rabbit")<<newl;
  return 0;
}


### Prompt

Construct a cpp code solution to the problem outlined:

Example

Input

mmemewwemeww


Output

Cat

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}
using Int = long long;
const char newl = '\n';

//INSERT ABOVE HERE
Int dp[505][505];

signed main(){
  cin.tie(0);
  ios::sync_with_stdio(0);

  string s;
  cin>>s;
  Int n=s.size();
  if(n%3){
    cout<<"Rabbit"<<newl;
    return 0;
  }

  memset(dp,0,sizeof(dp));
  for(Int i=0;i<=n;i++) dp[i][i]=1;

  for(Int w=3;w<=n;w+=3){
    for(Int l=0;l+w<=n;l++){
      Int r=l+w-1;
      if(s[l]!='m') continue;
      if(s[r]!='w') continue;
      for(Int m=l+1;m<r;m++){
        if(s[m]!='e') continue;
        dp[l][l+w]|=dp[l+1][m] and dp[m+1][r];
      }
    }
  }

  cout<<(dp[0][n]?"Cat":"Rabbit")<<newl;
  return 0;
}


```