#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, z0, k0, d, p, k[210];
  bool z[210][52];
  cin >> n >> z0 >> k0;
  string s;
  cin >> s;
  cin >> s;
  if (s == "tail")
    p = 1;
  else
    p = -1;
  cin >> s;
  d = s.length();
  k[0] = k0;
  for (int i = 0; i < d; i++) {
    k0 += p;
    if (k0 < 1 || k0 > n) {
      p = -p;
      k0 += p + p;
    }
    k[i + 1] = k0;
  }
  memset(z, 0, sizeof(z));
  z[0][z0] = 1;
  for (int i = 0; i <= d - 1; ++i)
    if (s[i] == '0') {
      for (int j = 1; j <= n; ++j)
        if (z[i][j] == 1) {
          if (k[i + 1] != j) z[i + 1][j] = 1;
          if (j > 1 && k[i] != j - 1 && k[i + 1] != j - 1) z[i + 1][j - 1] = 1;
          if (j < n && k[i] != j + 1 && k[i + 1] != j + 1) z[i + 1][j + 1] = 1;
        }
      bool v = 0;
      for (int j = 1; j <= n; ++j)
        if (z[i + 1][j]) v = 1;
      if (v == 0) {
        cout << "Controller " << i + 1 << endl;
        return 0;
      }
    } else {
      for (int j = 1; j <= n; ++j)
        if (j != k[i + 1]) z[i + 1][j] = 1;
    }
  for (int j = 1; j <= n; ++j)
    if (z[d - 1][j] == 1) {
      cout << "Stowaway" << endl;
      return 0;
    }
  return 0;
}
