#include <bits/stdc++.h>
using namespace std;
char S[1 << 20];
int n, Z, K;
vector<int> P;
int N;
int dp[1000][1000];
int rec(int k, int z) {
  if (k == N) return N;
  if (P[k] == z) return k;
  int &r = dp[k][z];
  if (r != -1) return r;
  if (S[k] == '0') {
    int r1 = -1;
    if (z + 1 <= n && z + 1 != P[k]) r1 = rec(k + 1, z + 1);
    int r2 = -1;
    if (z - 1 >= 1 && z - 1 != P[k]) r2 = rec(k + 1, z - 1);
    int r3 = rec(k + 1, z);
    r = max(r1, max(r2, r3));
  }
  if (S[k] == '1') {
    for (int i = 1; i <= n; ++i) {
      int t = rec(k + 1, i);
      r = max(t, r);
    }
  }
  return r;
}
int main() {
  cin >> n >> Z >> K;
  char str[100];
  do {
    gets(str);
  } while (!str[0]);
  int d = 1;
  if (str[3] == 'h') d = -1;
  scanf("%s", S);
  N = 0;
  while (S[N]) ++N;
  P.push_back(K);
  for (int k = 1; k <= N; ++k) {
    if (K == 1) d = 1;
    if (K == n) d = -1;
    K += d;
    P.push_back(K);
  }
  memset(dp, -1, sizeof(dp));
  int r = rec(0, Z);
  if (r == N)
    puts("Stowaway");
  else {
    printf("Controller %d\n", r);
  }
  return 0;
}
