#include <bits/stdc++.h>
using namespace std;
int pos, sto, n, direct;
char mipos[205];
bool win;
void check() {
  if (pos == sto) win = true;
}
void moves(int time) {
  if (pos < sto && sto < n)
    sto++;
  else {
    if (pos > sto && sto > 1) sto--;
  }
  if (mipos[time - 1] == '1' && time != 0) {
    if (direct == 1) {
      if (pos > 1) sto = 1;
      if (pos == 1) sto = n;
    } else {
      if (pos < n) sto = n;
      if (pos == n) sto = 1;
    }
  }
  if (pos == 1)
    direct = 1;
  else if (pos == n)
    direct = -1;
  pos += direct;
  check();
}
void stops(int time) {
  if (pos == 1)
    direct = 1;
  else if (pos == n)
    direct = -1;
  pos += direct;
}
int main() {
  int i, j, len, time;
  string pos2;
  while (cin >> n >> sto >> pos) {
    memset(mipos, 0, sizeof(mipos));
    win = false;
    cin >> pos2;
    cin >> pos2;
    if (pos2 == "head")
      direct = -1;
    else
      direct = 1;
    scanf("%s", mipos);
    len = strlen(mipos);
    check();
    for (time = 0; time < len; time++) {
      if (mipos[time] == '0')
        moves(time);
      else
        stops(time);
      if (win) break;
    }
    if (win) {
      cout << "Controller " << time + 1 << endl;
    } else
      cout << "Stowaway" << endl;
  }
  return 0;
}
