#include <bits/stdc++.h>
using namespace std;
long long n, mid, l, r, t[600000], ans, cur, m;
int dp[60][2005][60][5];
map<char, int> p;
string ch;
bool o;
int sol(int id, int res, int ma, char c) {
  if (res <= 0) {
    o = 1;
    return 0;
  }
  if (id == n) return 2e9;
  int k = p[c];
  if (dp[id][res][ma][k] != -1) return dp[id][res][ma][k];
  dp[id][res][ma][k] = 1e9;
  if (ch[id] != c && t[id] > ma)
    dp[id][res][ma][k] = sol(id, res - t[id], t[id], ch[id]);
  if (id - 1 != -1)
    dp[id][res][ma][k] = min(dp[id][res][ma][k], sol(id - 1, res, ma, c) + 1);
  return dp[id][res][ma][k] =
             min(dp[id][res][ma][k], sol(id + 1, res, ma, c) + 1);
}
int main() {
  memset(dp, -1, sizeof(dp));
  cin >> n >> cur >> m;
  for (int i = 0; i < n; i++) cin >> t[i];
  cin >> ch;
  char cc = 'r';
  p['R'] = 1;
  p['G'] = 2;
  p['B'] = 3;
  p[cc] = 0;
  int x = sol(cur - 1, m, 0, cc);
  if (o)
    cout << x;
  else
    cout << -1;
}
