#include <bits/stdc++.h>
const int N = 100010;
const int inf = 0x3f3f3f3f;
using namespace std;
int n, m, k, len;
int dp[209][59][59][2];
char s[209];
int dfs(int l, int a, int b, int c) {
  int &ret = dp[l][a][b][c];
  if (a == b) return ret = 0;
  if (s[l] == 0) return inf;
  if (ret + 1) return ret;
  ret = 0;
  if (s[l] == '1') {
    for (int i = 1; i <= n; i++) {
      if (c == 0) {
        if (b > 1)
          ret = max(ret, dfs(l + 1, i, b - 1, c) + 1);
        else
          ret = max(ret, dfs(l + 1, i, b + 1, 1) + 1);
      } else {
        if (b < n)
          ret = max(ret, dfs(l + 1, i, b + 1, c) + 1);
        else
          ret = max(ret, dfs(l + 1, i, b - 1, 0) + 1);
      }
    }
  } else {
    if (c == 0) {
      if (b > 1) {
        ret = max(ret, dfs(l + 1, a, b - 1, c) + 1);
        if (a > 1 && a - 1 != b)
          ret = max(ret, dfs(l + 1, a - 1, b - 1, c) + 1);
        if (a < n && a + 1 != b)
          ret = max(ret, dfs(l + 1, a + 1, b - 1, c) + 1);
      } else {
        ret = max(ret, dfs(l + 1, a, b + 1, 1) + 1);
        if (a > 1 && a - 1 != b)
          ret = max(ret, dfs(l + 1, a - 1, b + 1, 1) + 1);
        if (a < n && a + 1 != b)
          ret = max(ret, dfs(l + 1, a + 1, b + 1, 1) + 1);
      }
    } else {
      if (b < n) {
        ret = max(ret, dfs(l + 1, a, b + 1, c) + 1);
        if (a > 1 && a - 1 != b)
          ret = max(ret, dfs(l + 1, a - 1, b + 1, c) + 1);
        if (a < n && a + 1 != b)
          ret = max(ret, dfs(l + 1, a + 1, b + 1, c) + 1);
      } else {
        ret = max(ret, dfs(l + 1, a, b - 1, 0) + 1);
        if (a > 1 && a - 1 != b)
          ret = max(ret, dfs(l + 1, a - 1, b - 1, 0) + 1);
        if (a < n && a + 1 != b)
          ret = max(ret, dfs(l + 1, a + 1, b - 1, 0) + 1);
      }
    }
  }
  return ret;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  int ss = 0;
  scanf("%s %s", s, s);
  if (s[0] == 't') ss = 1;
  memset(dp, -1, sizeof(dp));
  scanf("%s", s);
  if (dfs(0, m, k, ss) >= inf)
    puts("Stowaway");
  else
    printf("Controller %d\n", dfs(0, m, k, ss));
  return 0;
}
