#include <bits/stdc++.h>
using namespace std;
char str[1005], mov[20];
int pos[1005];
int main() {
  int n, chor, ctr, i;
  scanf("%d", &n);
  scanf("%d", &chor);
  scanf("%d", &ctr);
  getchar();
  gets(mov);
  gets(str);
  if (chor == ctr) {
    printf("Controller 0\n");
    return 0;
  }
  int dan;
  if (mov[3] == 't')
    dan = 1;
  else
    dan = 0;
  if (dan && ctr == n) {
    dan = 0;
  }
  if (!dan && ctr == 1) {
    dan = 1;
  }
  for (i = 0; str[i]; i++) {
    if (str[i] == '0') {
      if (chor > ctr) {
        if (chor < n) chor++;
      } else if (chor < ctr) {
        if (chor > 1) chor--;
      }
      if (ctr == chor) break;
      if (dan) {
        ctr++;
        if (ctr > n) {
          dan = 0;
          ctr -= 2;
        }
      } else {
        ctr--;
        if (ctr < 1) {
          dan = 1;
          ctr += 2;
        }
      }
      if (ctr == chor) break;
    } else {
      if (dan) {
        ctr++;
        if (ctr > n) {
          dan = 0;
          ctr -= 2;
        }
      } else {
        ctr--;
        if (ctr < 1) {
          dan = 1;
          ctr += 2;
        }
      }
      if (dan) {
        if (ctr == 1)
          chor = n;
        else
          chor = 1;
      } else {
        if (ctr == n)
          chor = 1;
        else
          chor = n;
      }
      if (ctr == chor) break;
    }
  }
  if (str[i])
    printf("Controller %d\n", i + 1);
  else
    printf("Stowaway\n");
  return 0;
}
