#include <bits/stdc++.h>
int main() {
  int n, m, k, i, t;
  char str[205], dir[20];
  while (scanf("%d%d%d", &n, &m, &k) != EOF) {
    scanf("%s%s", str, dir);
    if (dir[0] == 'h')
      t = -1;
    else
      t = 1;
    scanf("%s", str);
    for (i = 0; str[i]; i++) {
      if (str[i] == '0') {
        if (t == -1) {
          if (m != 1) m--;
          k--;
          if (k == 1) t = 1;
        } else {
          if (m != n) m++;
          k++;
          if (k == n) t = -1;
        }
        if (k == m) break;
      } else {
        if (t == -1) {
          k--;
          if (k == 1) t = 1;
          m = k + 1;
        } else {
          k++;
          if (k == n) t = -1;
          m = k - 1;
        }
      }
    }
    if (str[i] == '\0')
      printf("Stowaway\n");
    else
      printf("Controller %d\n", i + 1);
  }
  return 0;
}
