#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, s, c, i, j, k;
  cin >> n >> s >> c;
  string a, v;
  cin >> v >> a;
  string b;
  cin >> b;
  long long t, m = 0, d = 0;
  if (a[0] == 'h')
    t = 1;
  else
    t = 2;
  k = b.size();
  for (i = 0; i < k; i++) {
    if (b[i] == '0') {
      m++;
      if (c < s && s != n)
        s++;
      else if (c > s && s != 1)
        s--;
      if (t == 1)
        c--;
      else
        c++;
      if (c == 1)
        t = 2;
      else if (c == n)
        t = 1;
      if (c == s) {
        d = 1;
        break;
      }
    } else {
      m++;
      if (i == k - 1) break;
      if (c < s && t == 1)
        s = n;
      else if (c < s && t == 2 && c != 1)
        s = 1;
      else if (c < s && t == 2 && c == 1)
        s = 1;
      else if (c > s && t == 2)
        s = 1;
      else if (c > s && t == 1 && c != n)
        s = n;
      else if (c > s && t == 1 && c == n)
        s = n;
      if (t == 1)
        c--;
      else
        c++;
      if (c == 1)
        t = 2;
      else if (c == n)
        t = 1;
    }
  }
  if (d == 1) {
    cout << "Controller " << m << endl;
  } else {
    cout << "Stowaway" << endl;
  }
}
