#include <bits/stdc++.h>
using namespace std;
const int N = 111;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
char str[300];
int main() {
  int n, s, c;
  int d;
  cin >> n >> s >> c;
  cin >> str >> str;
  if (str[0] == 'h')
    d = -1;
  else
    d = 1;
  cin >> str + 1;
  int pc, pd;
  for (int i = 1; str[i]; ++i) {
    pc = c, pd = d;
    c += d;
    if (c == 1 || c == n) d = -d;
    if (str[i] == '0') {
      if (pc < s && s < n) ++s;
      if (pc > s && s > 1) --s;
    } else {
      if ((pc > 1 && pd == 1) || pc == 1)
        s = 1;
      else if ((pc < n && pd == -1) || pc == n)
        s = n;
    }
    if (c == s) {
      cout << "Controller " << i << endl;
      return 0;
    }
  }
  cout << "Stowaway" << endl;
  return 0;
}
