#include <bits/stdc++.h>
using namespace std;
int n, z, k, a[300], num, v, ans = -1;
string s;
int main() {
  cin >> n >> z >> k >> s >> s;
  if (s[0] == 't')
    v = 1;
  else
    v = -1;
  cin >> s;
  num = s.size();
  for (int i = 0; i < num; i++) a[i] = s[i] - '0';
  for (int i = 0; i < num - 1 && ans < 0; i++) switch (a[i]) {
      case 0: {
        if (z == k) {
          ans = i + 1;
          break;
        }
        int dz = (z - k) / abs(z - k);
        if (z + dz >= 1 && z + dz <= n) z += dz;
        k += v;
        if (k == n || k == 1) v = -v;
        if (z == k) {
          ans = i + 1;
          break;
        }
        break;
      }
      case (1): {
        k += v;
        if (k == n || k == 1) v = -v;
        if ((v == 1 && k != 1) || (v == -1 && k == n))
          z = 1;
        else
          z = n;
        break;
      }
    }
  if (ans < 0)
    cout << "Stowaway";
  else
    cout << "Controller " << ans;
  return 0;
}
