#include <bits/stdc++.h>
using namespace std;
const int MAX = 55;
int N, A, B, L;
char s[210];
bool dp[210][MAX][MAX];
void init() {
  for (int i = 0; i <= L; i++) {
    for (int j = 1; j <= N; j++) {
      for (int k = 1; k <= N; k++) dp[i][j][k] = 0;
    }
  }
  dp[0][A][B] = 1;
}
int okay() {
  for (int i = 1; i <= N; i++) {
    for (int j = 1; j <= N; j++) {
      if (dp[L][i][j] == 1 && i != j) return -1;
    }
  }
  int res = 0;
  for (int i = 1; i <= L; i++) {
    for (int j = 1; j <= N; j++) {
      for (int k = 1; k <= N; k++) {
        if (dp[i][j][k] == 1 && j == k) res = i;
      }
    }
  }
  return res;
}
int main() {
  while (scanf("%d%d%d", &N, &B, &A) == 3) {
    scanf("%s", s + 1);
    scanf("%s", s + 1);
    int da = 1;
    if (s[1] == 'h') da = -1;
    scanf("%s", s + 1);
    L = strlen(s + 1);
    init();
    for (int i = 0; i <= L - 1; i++) {
      for (int j = 1; j <= N; j++) {
        for (int k = 1; k <= N; k++) {
          if (j == k) continue;
          if (dp[i][j][k] == 0) continue;
          int A = j, B = k;
          A += da;
          if (A == 0) {
            A = 2;
            da = 1;
          }
          if (A == N + 1) {
            A = N - 1;
            da = -1;
          }
          if (s[i + 1] == '0') {
            if (B - 1 == j) {
              dp[i + 1][A][B] = 1;
              dp[i + 1][A][B + 1] = 1;
            } else if (B + 1 == j) {
              dp[i + 1][A][B] = 1;
              dp[i + 1][A][B - 1] = 1;
            } else {
              dp[i + 1][A][B - 1] = dp[i + 1][A][B + 1] = 1;
              dp[i + 1][A][B] = 1;
            }
          } else if (s[i + 1] == '1') {
            for (int x = 1; x <= N; x++) {
              dp[i + 1][A][x] = 1;
            }
          }
        }
      }
    }
    int ans = okay();
    if (ans == -1)
      puts("Stowaway");
    else
      printf("Controller %d\n", ans);
  }
  return 0;
}
