#include <bits/stdc++.h>
using namespace std;
namespace {
using uint = unsigned int;
using uint_col = vector<uint>;
int solve(const uint_col &counts, const uint_col &colors, uint pos, uint tgt) {
  using pos_count_map = map<uint, uint_col>;
  using count_map = unordered_map<uint, uint>;
  using pos_color_col = vector<vector<count_map>>;
  pos_count_map poscounts;
  for (uint i = 0; i < counts.size(); ++i) {
    poscounts[counts[i]].push_back(i);
  }
  pos_color_col poscol;
  const auto maxcolor = 2;
  for (uint j = 0; j < counts.size(); ++j) {
    const uint d = abs(static_cast<int>(pos - 1) - static_cast<int>(j));
    pos_color_col::value_type ps;
    for (uint i = 0; i <= maxcolor; ++i) {
      ps.push_back(count_map{make_pair(d, 0)});
    }
    poscol.push_back(move(ps));
  }
  uint mindist = numeric_limits<uint>::max();
  for (const auto &poscount : poscounts) {
    pos_color_col cur_poscol(poscol);
    for (auto p : poscount.second) {
      for (uint j = 0; j < cur_poscol.size(); ++j) {
        for (uint color = 0; color < cur_poscol[j].size(); ++color) {
          if (colors[p] == color) continue;
          const uint d = abs(static_cast<int>(p) - static_cast<int>(j));
          for (const auto &pc : poscol[j][color]) {
            const auto nd = pc.first + d;
            auto &count = cur_poscol[p][colors[p]][nd];
            count = max(count, pc.second + poscount.first);
            if (count >= tgt) mindist = min(mindist, nd);
          }
        }
      }
    }
    poscol = move(cur_poscol);
  }
  if (mindist < numeric_limits<int>::max()) return mindist;
  return -1;
}
}  // namespace
int main() {
  int n = 0;
  uint s = 0;
  uint k = 0;
  cin >> n >> s >> k;
  uint_col counts;
  for (int i = 0; i < n; ++i) {
    uint v = 0;
    cin >> v;
    counts.push_back(v);
  }
  cin.ignore();
  uint_col colors;
  string c;
  getline(cin, c);
  assert(static_cast<size_t>(n) == c.size());
  for (int i = 0; i < n; ++i) {
    uint v = 0;
    switch (c[i]) {
      case 'R':
        v = 0;
        break;
      case 'G':
        v = 1;
        break;
      case 'B':
        v = 2;
        break;
      default:
        assert(false);
        break;
    }
    colors.push_back(v);
  }
  cout << solve(counts, colors, s, k) << endl;
  return 0;
}
