#include <bits/stdc++.h>
using namespace std;
struct point {
  double x, y;
  point(double x, double y) : x(x), y(y) {}
  point() { x = y = 0.0; }
  point operator+(point q) { return point(x + q.x, y + q.y); }
  point operator-(point q) { return point(x - q.x, y - q.y); }
  point operator*(double t) { return point(x * t, y * t); }
  point operator/(double t) { return point(x / t, y / t); }
  double operator*(point q) { return q.x * x + q.y * y; }
  double operator%(point q) { return x * q.y - y * q.x; }
};
const double PI = 2.0 * acos(0.0);
inline int getInt() {
  int x;
  scanf("%d", &x);
  return x;
}
inline long long getLL() {
  long long x;
  scanf("%lld", &x);
  return x;
};
inline int NUM(char c) { return (int)c - 48; }
inline char CHR(int n) { return (char)(n + 48); }
template <class T>
inline T MAX(T a, T b) {
  if (a > b) return a;
  return b;
}
template <class T>
inline T MIN(T a, T b) {
  if (a < b) return a;
  return b;
}
inline int BPM(int a, int b, int MOD) {
  if (a == 0) return 0;
  if (b == 0) return 1 % MOD;
  if (b % 2 == 1) return (int)((long long)BPM(a, b - 1, MOD) * a % MOD);
  int tmp = BPM(a, b / 2, MOD);
  return (int)((long long)tmp * tmp % MOD);
}
inline int phi(int N) {
  int ret = N;
  for (int i = 2; N > 1; i++) {
    if (i * i > N) {
      ret -= ret / N;
      break;
    }
    if (N % i == 0) {
      ret -= ret / i;
      while (N % i == 0) N /= i;
    }
  }
  return ret;
}
inline void OPEN(string s) {
  freopen((s + ".in").c_str(), "r", stdin);
  freopen((s + ".out").c_str(), "w", stdout);
}
char dum[10], dir[200];
char s[200 + 5];
int N, C, second, d, T;
int dp[200 + 5][50 + 5][2][50 + 5][2];
int dpAny[200 + 5][50 + 5][2];
int doDP(int t, int cpos, int cdir, int spos, int turn);
int doDPAny(int t, int cpos, int cdir) {
  int &ret = dpAny[t][cpos][cdir + 1];
  if (ret != -1) return ret;
  ret = -1;
  for (int i = 0, _n = (N); i < _n; i++) {
    int dd = cdir;
    if (cpos + cdir == 0 || cpos + cdir == N - 1) dd = -dd;
    ret = MAX(ret, doDP(t + 1, cpos + cdir, dd, i, 0));
  }
  return ret;
}
int doDP(int t, int cpos, int cdir, int spos, int turn) {
  if (cpos == spos) {
    return t;
  }
  if (t == T - 1) {
    return 1000000005;
  }
  int &ret = dp[t][cpos][cdir + 1][spos][turn];
  if (ret != -1) return ret;
  if (turn == 0) {
    if (s[t] == '0') {
      ret = doDP(t, cpos, cdir, spos, !turn);
      if (spos - 1 >= 0) ret = MAX(ret, doDP(t, cpos, cdir, spos - 1, !turn));
      if (spos + 1 < N) ret = MAX(ret, doDP(t, cpos, cdir, spos + 1, !turn));
    } else {
      ret = -1;
      ret = MAX(ret, doDPAny(t, cpos, cdir));
    }
  } else {
    int dd = cdir;
    if (cpos + cdir == 0 || cpos + cdir == N - 1) dd = -dd;
    ret = 1000000005;
    ret = MIN(ret, doDP(t + 1, cpos + cdir, dd, spos, !turn));
  }
  return ret;
}
int main() {
  scanf("%d%d%d", &N, &second, &C);
  C--;
  second--;
  scanf("%s%s", dum, dir);
  if (dir[0] == 'h')
    d = -1;
  else
    d = 1;
  scanf("%s", s);
  T = strlen(s);
  int ret = -1;
  memset(dp, -1, sizeof(dp));
  memset(dpAny, -1, sizeof(dpAny));
  ret = doDP(0, C, d, second, 0);
  if (ret == 1000000005) {
    puts("Stowaway");
  } else {
    printf("Controller %d\n", ret);
  }
  return 0;
}
