#include <bits/stdc++.h>
using namespace std;
const int INF = 1e6;
int n, m, k;
string s1, s2, s3;
int dir;
int main() {
  cin >> n >> m >> k;
  cin >> s1 >> s2;
  cin >> s3;
  if (s2[0] == 't')
    dir = 1;
  else
    dir = -1;
  int len = s3.length();
  for (int i = 0; i < len; i++) {
    int kk = k;
    k += dir;
    if (k > n) {
      dir = -1;
      k = n - 1;
    } else {
      if (k < 1) {
        dir = 1;
        k = 2;
      }
    }
    if (m > kk) {
      m++;
      if (m > n) m = n;
    } else {
      m--;
      if (m < 1) m = 1;
    }
    if (s3[i] == '0' && m == k) {
      cout << "Controller " << i + 1 << endl;
      return 0;
    }
    if (s3[i] == '1') {
      if (dir == 1)
        m = k - 1;
      else
        m = k + 1;
      if (m < 1) m = 1;
      if (m > n) m = n;
    }
  }
  cout << "Stowaway" << endl;
  return 0;
}
