#include <bits/stdc++.h>
using namespace std;
char s[10], t[211];
int main(void) {
  int n, k, m;
  scanf("%d%d%d ", &n, &k, &m);
  gets(s);
  gets(t);
  int dir = (s[3] == 'h' ? -1 : 1);
  for (int i = 0; i < strlen(t); i++) {
    if (t[i] == '0') {
      if (k > m && k + 1 <= n)
        k++;
      else if (k < m && k - 1 >= 1)
        k--;
      m += dir;
      if (m == n || m == 1) dir = (dir == 1 ? -1 : 1);
    } else if (t[i] == '1') {
      m += dir;
      if (m == n || m == 1) dir = (dir == 1 ? -1 : 1);
      if (dir == 1 && m != 1)
        k = 1;
      else if (dir == 1)
        k = n;
      else if (dir == -1 && m != n)
        k = n;
      else if (dir == -1)
        k = 1;
    }
    if (k == m) {
      printf("Controller %d\n", i + 1);
      return 0;
    }
  }
  puts("Stowaway");
  return 0;
}
