#include <iostream>
#include <string>

using namespace std;

const string mew = "mew";

int main()
{
  string s1, s2;
  int p, q, t;
  bool f;

  while(cin>>s1){
    p = q = s1.size();
    f = false;
    while(p > 0 && q > 0){
      t = -1;
      if(s1.size() == 3 && s1 == mew){
	f = true;
	break;
      }
      for(int i = 0; i < s1.size()-3; ++i)
	if(s1.substr(i, 3) == mew){
	  t = i;
	  break;
	}

      if(t == -1){
	f = false;
	break;
      }
      // cout << s1 << endl;
      s2 = s1.substr(t+3);
      s1 = s1.substr(0, t);
      // cout << t << "- " << s1 << " " << s2 << " : ";
      p = s1.size();
      q = s2.size();
      s1 += s2;
      // cout << s1 << endl;
    }

    cout << ((f)? "Cat": "Rabbit") << endl;
  }

  return 0;
}
### Prompt

Please formulate a Cpp solution to the following problem:

Example

Input

mmemewwemeww


Output

Cat

### Response

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

using namespace std;

const string mew = "mew";

int main()
{
  string s1, s2;
  int p, q, t;
  bool f;

  while(cin>>s1){
    p = q = s1.size();
    f = false;
    while(p > 0 && q > 0){
      t = -1;
      if(s1.size() == 3 && s1 == mew){
	f = true;
	break;
      }
      for(int i = 0; i < s1.size()-3; ++i)
	if(s1.substr(i, 3) == mew){
	  t = i;
	  break;
	}

      if(t == -1){
	f = false;
	break;
      }
      // cout << s1 << endl;
      s2 = s1.substr(t+3);
      s1 = s1.substr(0, t);
      // cout << t << "- " << s1 << " " << s2 << " : ";
      p = s1.size();
      q = s2.size();
      s1 += s2;
      // cout << s1 << endl;
    }

    cout << ((f)? "Cat": "Rabbit") << endl;
  }

  return 0;
}
```