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

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define erep(i, m, n) for(int (i)=(m); (i)<=(n); (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define rrev(i, m, n) for(int (i)=(n)-1; (i)>=(m); (i)--)
#define erev(i, m, n) for(int (i)=(n); (i)>=(m); (i)--)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define pb            push_back
#define mp            make_pair
template<class T, class S> inline bool minup(T& m, const S x){ return m>(T)x ? (m=(T)x, true) : false; }
template<class T, class S> inline bool maxup(T& m, const S x){ return m<(T)x ? (m=(T)x, true) : false; }

static const int    INF = 1000000000;
static const ll     MOD = 1000000007LL;
static const double EPS = 1E-10;

namespace IO
{
#define _get(c) ((c)=getchar_unlocked())
#define _put(c) (putchar_unlocked(c))

  inline void readln(int* x){register int c,s=1;*x=0;while(_get(c),c!='-'&&(c<48||57<c));if(c=='-'){s=-1;_get(c);}for(;48<=c&&c<=57;_get(c))*x=((*x)<<3)+((*x)<<1)+c-48;(*x)*=s;}
  inline void readln(ll* x){register int c,s=1;*x=0;while(_get(c),c!='-'&&(c<48||57<c));if(c=='-'){s=-1;_get(c);}for(;48<=c&&c<=57;_get(c))*x=((*x)<<3)+((*x)<<1)+c-48;(*x)*=s;}
  inline void readln(double* f){scanf(" %lf",f);}
  inline void readln(char s[]){register char c;register int i=0;while(_get(c),c<33);while(c>=33){s[i]=c;_get(c);i++;}s[i]='\0';}
  inline void readln(string* s){*s="";register char c;while(_get(c),c<33);while(c>=33){*s+=c;_get(c);}}
  template<class S,class T> inline void readln(S* s, T* t){readln(s);readln(t);}
  template<class S,class T,class U> inline void readln(S* s, T* t, U* u){readln(s);readln(t);readln(u);}
  template<class S,class T,class U,class V> inline void readln(S* s, T* t, U* u ,V* v){readln(s);readln(t);readln(u);readln(v);}
  template<class S,class T,class U,class V,class W> inline void readln(S* s, T* t, U* u, V* v, W* w){readln(s);readln(t);readln(u);readln(v);readln(w);}

  inline void write(int x){register int N=x,r=N,c=0;if(N==0){_put('0');return;}if(N<0){_put('-');N*=-1;}while(r%10==0){c++;r/=10;}r=0;while(N!=0){r=(r<<3)+(r<<1)+N%10;N/=10;}while(r!=0){_put(r%10+'0');r/=10;}while(c--)_put('0');}
  inline void write(ll x){register ll N=x,r=N;register int c=0;if(N==0){_put('0');return;}if(N<0){_put('-');N*=-1;}while(r%10==0){c++;r/=10;}r=0;while(N!=0){r=(r<<3)+(r<<1)+N%10;N/=10;}while(r!=0){_put(r%10+'0');r/=10;}while(c--)_put('0');}
  inline void write(double f){printf("%.15f",f);}
  inline void write(char c){_put(c);}
  inline void write(char* s){for(register int i=0;s[i]!='\0';i++)_put(s[i]);}
  inline void write(string s){for(register int i=0;s[i]!='\0';i++)_put(s[i]);}
  inline void writeln(int x){write(x);write('\n');}
  inline void writeln(ll x){write(x);write('\n');}
  inline void writeln(double f){write(f);write('\n');}
  inline void writeln(char c){write(c);write('\n');}
  inline void writeln(char* s){write(s);write('\n');}
  inline void writeln(string s){write(s);write('\n');}
  template<class S,class T> inline void writeln(S s, T t){write(s);write(' ');writeln(t);}
  template<class S,class T,class U> inline void writeln(S s, T t, U u){write(s);write(' ');write(t);write(' ');writeln(u);}
  template<class S,class T,class U,class V> inline void writeln(S s, T t, U u ,V v){write(s);write(' ');write(t);write(' ');write(u);write(' ');writeln(v);}
  template<class S,class T,class U,class V,class W> inline void writeln(S s, T t, U u, V v, W w){write(s);write(' ');write(t);write(' ');write(u);write(' ');write(v);write(' ');writeln(w);}
}
using namespace IO;


string s;
int cnt;

typedef string::const_iterator State;
class ParseError{};

template<typename T> class Parsing
{
public:
  static T consume(State& begin, char expected) {
    if (*begin == expected) {
      begin++;
      return 1;
    } else {
      return 0;
      cerr << "Expected '" << expected << "' but got '" << *begin << "'"
           << endl;
      cerr << "Rest string is '";
      while (*begin) {
        cerr << *begin++;
      }
      cerr << "'" << endl;
      throw ParseError();
    }
  }

  static T CAT(State& begin){
    if(*begin == 'm' && *(begin + 1) == 'e' && *(begin + 2) == 'w'){
      consume(begin, 'm');
      consume(begin, 'e');
      consume(begin, 'w');
      return 1;
    }
    if(*begin == 'm'){
      if(!consume(begin, 'm')) return 0;
      if(*begin == 'm') if(!CAT(begin)) return 0;
      if(!consume(begin, 'e')) return 0;
      if(*begin == 'm') if(!CAT(begin)) return 0;
      if(!consume(begin, 'w')) return 0;
      return 1;
    }
    return 0;
  }
};

int main()
{
  readln(&s);

  State begin = s.begin();
  writeln(Parsing<bool>::CAT(begin) && begin == s.end() ? "Cat" : "Rabbit");

  return 0;
}

Measured memory_bytes: 1140