#include <bits/stdc++.h>
using namespace std;
const int mx = 1e9;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  string ss, s1, s2;
  char direction[176];
  int n, s, i, c, nows, nowc, time = 0, f, caught = 0, prenowc;
  cin >> n >> nows >> nowc >> s1 >> s2;
  if (s2[0] == 'h')
    f = 1;
  else
    f = 0;
  cin >> ss;
  if (f && nowc == 1)
    f = 0;
  else if (!f && nowc == n)
    f = 1;
  for (i = 0; i < ss.size() - 1; i++) {
    prenowc = nowc;
    if (f) {
      nowc--;
      if (nowc == 1) f = 0;
    } else {
      nowc++;
      if (nowc == n) f = 1;
    }
    if (ss[i] == '0') {
      if (prenowc > nows) {
        nows--;
        if (nows < 1) nows = 1;
      } else if (prenowc < nows) {
        nows++;
        if (nows == n + 1) nows = n;
      }
    } else if (ss[i] == '1') {
      if (nowc == 1)
        nows = n;
      else if (nowc == n)
        nows = 1;
      else if (nowc > 1 && f == 0)
        nows = 1;
      else if (nowc > 1 && f == 1)
        nows = n;
    }
    time++;
    if (nows == nowc) {
      caught = 1;
      break;
    }
  }
  if (caught == 1) {
    printf("Controller %d\n", time);
  } else {
    printf("Stowaway\n");
  }
  return 0;
}
