#include <bits/stdc++.h>
using namespace std;
int direction;
char ts[220];
int n, sp, cp, nextcp;
int cw;
int main() {
  scanf("%d %d %d", &n, &sp, &cp);
  scanf("%s %s", ts, ts);
  cw = 0;
  if (ts[1] == 'a') {
    direction = 1;
  } else {
    direction = -1;
  }
  scanf("%s", ts);
  for (int i = 0; i < strlen(ts); i++) {
    nextcp = cp + direction;
    if (nextcp > n || nextcp < 1) {
      direction *= -1;
      nextcp = cp + direction;
    }
    if (ts[i] == '1') {
      sp = cp;
    } else {
      if (nextcp == sp) {
        sp += direction;
        if (sp < 1 || sp > n) {
          cw = i + 1;
          break;
        }
      }
    }
    cp = nextcp;
  }
  if (cw != 0) {
    printf("Controller %d\n", cw);
  } else {
    printf("Stowaway\n");
  }
  return 0;
}
