#include <bits/stdc++.h>
using namespace std;
const int inf = (int)(1e9);
const int mod = inf + 7;
const double pi = acos(-1.0);
const double eps = 1e-9;
string a, b;
int n, m, k, d;
void first(int p) {
  if (p == (int)a.size() - 1) {
    puts("Stowaway");
    exit(0);
  }
  if (a[p] == '0') {
    if (k > m) {
      if (m) m--;
    } else {
      if (m != n - 1) m++;
    }
    if (d == -1) {
      if (k)
        k--;
      else {
        d = 1;
        k++;
      }
    } else {
      if (k != n - 1)
        k++;
      else {
        d = -1;
        k--;
      }
    }
    if (k == m) {
      cout << "Controller " << p + 1;
      exit(0);
    }
  } else {
    if (d == -1) {
      if (k)
        k--;
      else {
        d = 1;
        k++;
      }
    } else {
      if (k != n - 1)
        k++;
      else {
        d = -1;
        k--;
      }
    }
    if (k == 0 || k == n - 1)
      m = n - 1 - k;
    else {
      if (d == 1)
        m = 0;
      else
        m = n - 1;
    }
  }
}
int main() {
  cin >> n >> m >> k >> a;
  m--;
  k--;
  cin >> b >> a;
  if (b == "head")
    d = -1;
  else
    d = 1;
  for (int i = 0; i < a.length(); i++) first(i);
  return 0;
}
