#include <bits/stdc++.h>
using namespace std;
int n;
string what;
int dp[202][51][51][2];
int d[] = {1, -1};
int solve(int i, int robber, int police, int flag) {
  if (i == what.length()) return -2;
  int &ret = dp[i][robber][police][flag];
  if (ret != -1) return ret;
  int loss = 0, win = 0;
  int policenext, cur;
  if (police == 1 && flag) flag = 1 - flag;
  if (police == n && !flag) flag = 1 - flag;
  policenext = police + d[flag];
  if (what[i] == '0') {
    if (robber != policenext) {
      cur = solve(i + 1, robber, policenext, flag);
      if (cur == -2)
        win = 1;
      else
        loss = max(loss, cur);
    }
    if (robber > 1 && robber - 1 != policenext && robber - 1 != police) {
      cur = solve(i + 1, robber - 1, policenext, flag);
      if (cur == -2)
        win = 1;
      else
        loss = max(loss, cur);
    }
    if (robber < n && robber + 1 != policenext && robber + 1 != police) {
      cur = solve(i + 1, robber + 1, policenext, flag);
      if (cur == -2)
        win = 1;
      else
        loss = max(loss, cur);
    }
  } else {
    for (int j = 1; j <= n; j++)
      if (policenext != j) {
        cur = solve(i + 1, j, policenext, flag);
        if (cur == -2)
          win = 1;
        else
          loss = max(loss, cur);
      }
  }
  if (win) return ret = -2;
  return ret = max(loss, i);
}
int main() {
  int robber, police;
  cin >> n >> robber >> police;
  string s;
  cin >> s >> s >> what;
  int flag = (s == "head");
  memset(dp, -1, sizeof dp);
  int move = solve(0, robber, police, flag);
  if (move == -2) {
    puts("Stowaway");
  } else {
    printf("Controller %d\n", move + 1);
  }
  return 0;
}
