#include <bits/stdc++.h>
char buf[64];
int a[64];
int dpa[64][2048][3], dpb[64][2048][3];
int main() {
  int n, s, m;
  scanf("%d%d%d", &n, &s, &m), --s;
  for (int i = 0; i < n; ++i) scanf("%d", a + i);
  scanf("\n");
  fgets(buf, 64, stdin);
  for (int i = 0; i < n; ++i)
    a[i] = a[i] << 2 | (buf[i] == 'R'   ? 0
                        : buf[i] == 'G' ? 1
                        : buf[i] == 'B' ? 2
                                        : -1);
  for (int i = 0; i < n; ++i) a[i] = a[i] << 6 | i;
  std::sort(a, a + n);
  memset(dpb, -1, sizeof(dpb));
  for (int i = 0; i < 3; ++i) dpb[s][m][i] = 0;
  int pre = -1;
  for (int i = 0; i < n; ++i) {
    int r = a[i] >> 8, cu = a[i] >> 6 & 0x3, pu = a[i] & 0x3f;
    if (pre != r) memcpy(dpa, dpb, sizeof(dpa)), pre = r;
    for (int pv = 0; pv < n; ++pv)
      for (int vv = 0; vv <= m; ++vv)
        for (int cv = 0; cv < 3; ++cv)
          if (cv != cu) {
            int vu = std::max(0, vv - r);
            dpb[pu][vu][cu] =
                std::min((unsigned long long int)(unsigned int)dpb[pu][vu][cu],
                         (unsigned long long int)(unsigned int)dpa[pv][vv][cv] +
                             abs(pu - pv));
          }
    for (int v = 0; v <= m; ++v)
      for (int c = 0; c < 3; ++c)
        if (dpb[pu][v][c] != -1) 0;
  }
  int ans = -1;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < 3; ++j)
      ans = std::min((unsigned int)ans, (unsigned int)dpb[i][0][j]);
  printf("%d\n", ans);
  return 0;
}
