#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y) {
  if (y == 0) return 1;
  if (y == 1) return x;
  if (y % 2)
    return x * power(x, y / 2) * power(x, y / 2);
  else
    return power(x, y / 2) * power(x, y / 2);
}
void solve() {
  long long n, m, k;
  cin >> n >> m >> k;
  string dir;
  cin >> dir;
  cin >> dir;
  string state;
  cin >> state;
  long long f = 0, d, mn = 1;
  if (dir[0] == 'h')
    d = 0;
  else
    d = 1;
  for (long long i = 0; i < state.size(); i++) {
    if (state[i] == '0') {
      if (d == 0) {
        if (m < k)
          m--;
        else
          m++;
        m = max(mn, m);
        m = min(n, m);
        k--;
        k = max(mn, k);
        k = min(n, k);
      } else {
        if (m > k)
          m++;
        else
          m--;
        m = max(mn, m);
        m = min(n, m);
        k++;
        k = max(mn, k);
        k = min(n, k);
      }
    } else {
      if (d == 0)
        k--;
      else
        k++;
      k = max(mn, k);
      k = min(n, k);
      if (k == 1)
        m = n;
      else if (k == n)
        m = 1;
      else if (d == 0)
        m = n;
      else if (d == 1)
        m = 1;
    }
    if (k == 1 || k == n) d = !d;
    if (k == m) {
      cout << "Controller ";
      cout << i + 1 << "\n";
      return;
    }
  }
  cout << "Stowaway\n";
  return;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
