#include <bits/stdc++.h>
using namespace std;
int main() {
  char ost[205], way[55];
  int n, z, k;
  scanf("%d%d%d", &n, &z, &k);
  scanf("%s", way);
  scanf("%s", way);
  scanf("%s", ost);
  int kd = way[0] == 'h' ? -1 : 1;
  for (int m = 0; ost[m]; m++) {
    if (ost[m] == '1')
      z = -1;
    else {
      if (z < k) z = 1;
      if (z > k) z = n;
    }
    k += kd;
    if (k < 1) {
      k = 2;
      kd = 1;
    }
    if (k > n) {
      k = n - 1;
      kd = -1;
    }
    if (k == z) {
      printf("Controller %d\n", m + 1);
      return 0;
    }
    if (ost[m] == '1') z = kd > 0 ? 1 : n;
  }
  printf("Stowaway\n");
}
