#include <bits/stdc++.h>
using namespace std;
const int N = 210;
int n, m, k;
bool head = 0, flag = 0;
void cont() {
  if (head) {
    if (k == 1) {
      k = 2;
      head = 0;
    } else {
      k--;
    }
  } else {
    if (k == n) {
      k = n - 1;
      head = 1;
    } else {
      k++;
    }
  }
  if (k == 1) {
    head = 0;
  }
  if (k == n) {
    head = 1;
  }
  if (k == m) {
    flag = 1;
  }
}
void sto(int no) {
  if (no == 0) {
    if (m > k) {
      m = min(n, m + 1);
    } else if (m < k) {
      m = max(1, m - 1);
    }
  } else {
    if (head) {
      m = n;
    } else {
      m = 1;
    }
  }
}
long long power_mod(long long x, long long y) {
  x %= 1000000007;
  long long res = 1;
  while (y) {
    if (y & 1) {
      res = (res * x) % 1000000007;
    }
    y /= 2;
    x = (x * x) % 1000000007;
  }
  return res;
}
void solve() {
  string s, t;
  cin >> n >> m >> k >> s >> s >> t;
  int len = t.length();
  head = (s == "head");
  for (int i = 0; i < len; i++) {
    sto(t[i] - '0');
    cont();
    if (flag) {
      cout << "Controller " << i + 1 << "\n";
      return;
    }
  }
  cout << "Stowaway\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int tc = 1;
  while (tc--) {
    solve();
  }
  return 0;
}
