There are $$$n$$$ candy boxes in front of Tania. The boxes are arranged in a row from left to right, numbered from $$$1$$$ to $$$n$$$. The $$$i$$$-th box contains $$$r_i$$$ candies, candies have the color $$$c_i$$$ (the color can take one of three values — red, green, or blue). All candies inside a single box have the same color (and it is equal to $$$c_i$$$).Initially, Tanya is next to the box number $$$s$$$. Tanya can move to the neighbor box (that is, with a number that differs by one) or eat candies in the current box. Tanya eats candies instantly, but the movement takes one second.If Tanya eats candies from the box, then the box itself remains in place, but there is no more candies in it. In other words, Tanya always eats all the candies from the box and candies in the boxes are not refilled.It is known that Tanya cannot eat candies of the same color one after another (that is, the colors of candies in two consecutive boxes from which she eats candies are always different). In addition, Tanya's appetite is constantly growing, so in each next box from which she eats candies, there should be strictly more candies than in the previous one.Note that for the first box from which Tanya will eat candies, there are no restrictions on the color and number of candies.Tanya wants to eat at least $$$k$$$ candies. What is the minimum number of seconds she will need? Remember that she eats candies instantly, and time is spent only on movements.

The first line contains three integers $$$n$$$, $$$s$$$ and $$$k$$$ ($$$1 \le n \le 50$$$, $$$1 \le s \le n$$$, $$$1 \le k \le 2000$$$) — number of the boxes, initial position of Tanya and lower bound on number of candies to eat. The following line contains $$$n$$$ integers $$$r_i$$$ ($$$1 \le r_i \le 50$$$) — numbers of candies in the boxes. The third line contains sequence of $$$n$$$ letters 'R', 'G' and 'B', meaning the colors of candies in the correspondent boxes ('R' for red, 'G' for green, 'B' for blue). Recall that each box contains candies of only one color. The third line contains no spaces.

Print minimal number of seconds to eat at least $$$k$$$ candies. If solution doesn't exist, print "-1".

NoteThe sequence of actions of Tanya for the first example:  move from the box $$$3$$$ to the box $$$2$$$;  eat candies from the box $$$2$$$;  move from the box $$$2$$$ to the box $$$3$$$;  eat candy from the box $$$3$$$;  move from the box $$$3$$$ to the box $$$4$$$;  move from the box $$$4$$$ to the box $$$5$$$;  eat candies from the box $$$5$$$. Since Tanya eats candy instantly, the required time is four seconds.

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class C {

	static StringTokenizer st;
	static BufferedReader br;
	static PrintWriter pw;
	public static void main(String[] args) throws IOException {
		br = new BufferedReader(new InputStreamReader(System.in));
		pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = nextInt();
		int s = nextInt();
		int k = nextInt();
		int[]sweets = new int[n + 1];
		int[]place = new int[n + 1];
		for (int i = 1; i <= n; i++) {
			sweets[i] = nextInt();
			place[i] = i;
		}
		String col = next();
		char[]colors = new char[n+1];
		for (int i = 1; i <= n; i++) {
			colors[i] = col.charAt(i-1);
		}
		for (int i = 1; i <= n; i++) {
			for (int j = i+1; j <= n; j++) {
				if (sweets[i] > sweets[j]) {
					int t = sweets[i];
					sweets[i] = sweets[j];
					sweets[j] = t;

					t = place[i];
					place[i] = place[j];
					place[j] = t;

					char w = colors[i];
					colors[i] = colors[j];
					colors[j] = w;
				}
			}
		}
		int[][]dp = new int[n+1][2501];
		int INF = (int) 1e9;
		for (int i = 1; i <= n; i++) {
			Arrays.fill(dp[i], INF);
		}
		for (int i = 1; i <= n; i++) {
			dp[i][sweets[i]] = Math.abs(place[i]-s);
			for (int j = 1; j < i; j++) {
				if (colors[j] != colors[i] && sweets[i] != sweets[j]) {
					for (int j2 = sweets[i]; j2 <= 2500; j2++) {
						dp[i][j2] = Math.min(dp[i][j2], dp[j][j2-sweets[i]] + Math.abs(place[i]-place[j]));
					}
				}
			}
		}
		int ans = INF;
		for (int i = 1; i <= n; i++) {
			for (int j = k; j <= 2500; j++) {
				ans = Math.min(ans, dp[i][j]);
			}
		}
		if (ans==INF) {
			ans = -1;
		}
		System.out.println(ans);
		pw.close();
	}
	private static int nextInt() throws IOException {
		return Integer.parseInt(next());
	}
	private static long nextLong() throws IOException {
		return Long.parseLong(next());
	}
	private static double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}
	private static String next() throws IOException {
		while (st==null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}
}

import java.util.*;
import java.util.StringTokenizer;
import java.io.*;
public class Main {
    static int []arr;
    static int [][]dp;
    static String s;
    static ArrayList<Integer>[]G;

    public static int solve(int idx,int rem)
    {
        if (rem<=0) return 0;
        if (dp[idx][rem]!=-1) return dp[idx][rem];
        dp[idx][rem]=(int)1e6;
        for (int i=1;i<=3;++i)
        {
            if (i==1&&s.charAt(idx-1)=='R') continue;
            if (i==2&&s.charAt(idx-1)=='G') continue;
            if (i==3&&s.charAt(idx-1)=='B') continue;
            for (int u:G[i])
                if (arr[u]>arr[idx])
                    dp[idx][rem]=Math.min(dp[idx][rem],(solve(u, rem - arr[u])+Math.abs(u-idx)));
        }
        return dp[idx][rem];
    }

    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n=sc.nextInt();
        int pos=sc.nextInt();
        int k=sc.nextInt();
        G = new ArrayList[5];
        for (int i=0;i<5;++i) G[i] = new ArrayList();
        arr =new int [n+5];
        dp=new int [n+5][k+5];
        for (int i=0;i<=n+1;++i)
            for (int j=0;j<=k+1;++j)
                dp[i][j]=-1;

        for (int i=1;i<=n;++i) arr[i]=sc.nextInt();
        s=sc.nextLine();
        for (int i=0;i<n;++i)
        {
            char ch=s.charAt(i);
            if ( ch == 'R')
                G[1].add(i + 1);
            else if (ch == 'G')
                G[2].add(i + 1);
            else G[3].add(i + 1);
        }

        int cnt=(int)1e6;
        for (int i=1;i<=n;++i)
            cnt=Math.min(cnt,solve(i,k-arr[i])+Math.abs(i-pos));

        out.println((cnt>=(int)1e6)?-1:cnt);
        out.close();
    }
    static class Scanner
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

        public String next() throws IOException
        {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {return Integer.parseInt(next());}

        public long nextLong() throws IOException {return Long.parseLong(next());}

        public String nextLine() throws IOException {return br.readLine();}
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Iterator;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.NoSuchElementException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Egor Kulikov (egor@egork.net)
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        C solver = new C();
        solver.solve(1, in, out);
        out.close();
    }

    static class C {
        int[] r;
        char[] c;
        int[] pos;
        int[][] answer;
        int k;

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.readInt();
            int s = in.readInt() - 1;
            k = in.readInt();
            r = in.readIntArray(n);
            c = in.readCharArray(n);
            pos = ArrayUtils.order(r);
            pos = ArrayUtils.concatenate(ArrayUtils.createArray(1, s), pos);
            int[] order = pos.clone();
            order[0] = n;
            int[] rev = ArrayUtils.reversePermutation(order);
            r = Arrays.copyOf(r, n + 1);
            c = Arrays.copyOf(c, n + 1);
            ArrayUtils.orderBy(rev.clone(), r);
            ArrayUtils.orderBy(rev, c);
            answer = new int[n + 1][k];
            ArrayUtils.fill(answer, -2);
            out.printLine(go(0, 0));
        }

        private int go(int at, int eaten) {
            if (eaten >= k) {
                return 0;
            }
            if (answer[at][eaten] != -2) {
                return answer[at][eaten];
            }
            answer[at][eaten] = Integer.MAX_VALUE;
            for (int i = at + 1; i < pos.length; i++) {
                if (c[i] == c[at] || r[i] <= r[at]) {
                    continue;
                }
                int call = go(i, eaten + r[i]);
                if (call == -1) {
                    continue;
                }
                answer[at][eaten] = Math.min(answer[at][eaten], call + Math.abs(pos[i] - pos[at]));
            }
            if (answer[at][eaten] == Integer.MAX_VALUE) {
                answer[at][eaten] = -1;
            }
            return answer[at][eaten];
        }

    }

    static interface IntList extends IntReversableCollection {
        public abstract int get(int index);

        public abstract void set(int index, int value);

        public abstract void addAt(int index, int value);

        public abstract void removeAt(int index);

        default public void swap(int first, int second) {
            if (first == second) {
                return;
            }
            int temp = get(first);
            set(first, get(second));
            set(second, temp);
        }

        default public IntIterator intIterator() {
            return new IntIterator() {
                private int at;
                private boolean removed;

                public int value() {
                    if (removed) {
                        throw new IllegalStateException();
                    }
                    return get(at);
                }

                public boolean advance() {
                    at++;
                    removed = false;
                    return isValid();
                }

                public boolean isValid() {
                    return !removed && at < size();
                }

                public void remove() {
                    removeAt(at);
                    at--;
                    removed = true;
                }
            };
        }

        default public void add(int value) {
            addAt(size(), value);
        }

        default public IntList sort(IntComparator comparator) {
            Sorter.sort(this, comparator);
            return this;
        }

        default public IntList subList(final int from, final int to) {
            return new IntList() {
                private final int shift;
                private final int size;

                {
                    if (from < 0 || from > to || to > IntList.this.size()) {
                        throw new IndexOutOfBoundsException("from = " + from + ", to = " + to + ", size = " + size());
                    }
                    shift = from;
                    size = to - from;
                }

                public int size() {
                    return size;
                }

                public int get(int at) {
                    if (at < 0 || at >= size) {
                        throw new IndexOutOfBoundsException("at = " + at + ", size = " + size());
                    }
                    return IntList.this.get(at + shift);
                }

                public void addAt(int index, int value) {
                    throw new UnsupportedOperationException();
                }

                public void removeAt(int index) {
                    throw new UnsupportedOperationException();
                }

                public void set(int at, int value) {
                    if (at < 0 || at >= size) {
                        throw new IndexOutOfBoundsException("at = " + at + ", size = " + size());
                    }
                    IntList.this.set(at + shift, value);
                }

                public IntList compute() {
                    return new IntArrayList(this);
                }
            };
        }

    }

    static interface IntCollection extends IntStream {
        public int size();

        default public void add(int value) {
            throw new UnsupportedOperationException();
        }

        default public int[] toArray() {
            int size = size();
            int[] array = new int[size];
            int i = 0;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                array[i++] = it.value();
            }
            return array;
        }

        default public IntCollection addAll(IntStream values) {
            for (IntIterator it = values.intIterator(); it.isValid(); it.advance()) {
                add(it.value());
            }
            return this;
        }

    }

    static interface IntIterator {
        public int value() throws NoSuchElementException;

        public boolean advance();

        public boolean isValid();

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public char[] readCharArray(int size) {
            char[] array = new char[size];
            for (int i = 0; i < size; i++) {
                array[i] = readCharacter();
            }
            return array;
        }

        public int[] readIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++) {
                array[i] = readInt();
            }
            return array;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public char readCharacter() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            return (char) c;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static abstract class IntAbstractStream implements IntStream {
        public String toString() {
            StringBuilder builder = new StringBuilder();
            boolean first = true;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                if (first) {
                    first = false;
                } else {
                    builder.append(' ');
                }
                builder.append(it.value());
            }
            return builder.toString();
        }

        public boolean equals(Object o) {
            if (!(o instanceof IntStream)) {
                return false;
            }
            IntStream c = (IntStream) o;
            IntIterator it = intIterator();
            IntIterator jt = c.intIterator();
            while (it.isValid() && jt.isValid()) {
                if (it.value() != jt.value()) {
                    return false;
                }
                it.advance();
                jt.advance();
            }
            return !it.isValid() && !jt.isValid();
        }

        public int hashCode() {
            int result = 0;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                result *= 31;
                result += it.value();
            }
            return result;
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void printLine(int i) {
            writer.println(i);
        }

    }

    static class Range {
        public static IntList range(int from, int to) {
            int[] result = new int[Math.abs(from - to)];
            int current = from;
            if (from <= to) {
                for (int i = 0; i < result.length; i++) {
                    result[i] = current++;
                }
            } else {
                for (int i = 0; i < result.length; i++) {
                    result[i] = current--;
                }
            }
            return new IntArray(result);
        }

    }

    static class Sorter {
        private static final int INSERTION_THRESHOLD = 16;

        private Sorter() {
        }

        public static void sort(IntList list, IntComparator comparator) {
            quickSort(list, 0, list.size() - 1, (Integer.bitCount(Integer.highestOneBit(list.size()) - 1) * 5) >> 1,
                    comparator);
        }

        private static void quickSort(IntList list, int from, int to, int remaining, IntComparator comparator) {
            if (to - from < INSERTION_THRESHOLD) {
                insertionSort(list, from, to, comparator);
                return;
            }
            if (remaining == 0) {
                heapSort(list, from, to, comparator);
                return;
            }
            remaining--;
            int pivotIndex = (from + to) >> 1;
            int pivot = list.get(pivotIndex);
            list.swap(pivotIndex, to);
            int storeIndex = from;
            int equalIndex = to;
            for (int i = from; i < equalIndex; i++) {
                int value = comparator.compare(list.get(i), pivot);
                if (value < 0) {
                    list.swap(storeIndex++, i);
                } else if (value == 0) {
                    list.swap(--equalIndex, i--);
                }
            }
            quickSort(list, from, storeIndex - 1, remaining, comparator);
            for (int i = equalIndex; i <= to; i++) {
                list.swap(storeIndex++, i);
            }
            quickSort(list, storeIndex, to, remaining, comparator);
        }

        private static void heapSort(IntList list, int from, int to, IntComparator comparator) {
            for (int i = (to + from - 1) >> 1; i >= from; i--) {
                siftDown(list, i, to, comparator, from);
            }
            for (int i = to; i > from; i--) {
                list.swap(from, i);
                siftDown(list, from, i - 1, comparator, from);
            }
        }

        private static void siftDown(IntList list, int start, int end, IntComparator comparator, int delta) {
            int value = list.get(start);
            while (true) {
                int child = ((start - delta) << 1) + 1 + delta;
                if (child > end) {
                    return;
                }
                int childValue = list.get(child);
                if (child + 1 <= end) {
                    int otherValue = list.get(child + 1);
                    if (comparator.compare(otherValue, childValue) > 0) {
                        child++;
                        childValue = otherValue;
                    }
                }
                if (comparator.compare(value, childValue) >= 0) {
                    return;
                }
                list.swap(start, child);
                start = child;
            }
        }

        private static void insertionSort(IntList list, int from, int to, IntComparator comparator) {
            for (int i = from + 1; i <= to; i++) {
                int value = list.get(i);
                for (int j = i - 1; j >= from; j--) {
                    if (comparator.compare(list.get(j), value) <= 0) {
                        break;
                    }
                    list.swap(j, j + 1);
                }
            }
        }

    }

    static class ArrayUtils {
        public static void fill(int[][] array, int value) {
            for (int[] row : array) {
                Arrays.fill(row, value);
            }
        }

        public static int[] range(int from, int to) {
            return Range.range(from, to).toArray();
        }

        public static int[] createOrder(int size) {
            return range(0, size);
        }

        public static int[] sort(int[] array, IntComparator comparator) {
            return sort(array, 0, array.length, comparator);
        }

        public static int[] sort(int[] array, int from, int to, IntComparator comparator) {
            if (from == 0 && to == array.length) {
                new IntArray(array).sort(comparator);
            } else {
                new IntArray(array).subList(from, to).sort(comparator);
            }
            return array;
        }

        public static int[] order(final int[] array) {
            return sort(createOrder(array.length), new IntComparator() {
                public int compare(int first, int second) {
                    if (array[first] < array[second]) {
                        return -1;
                    }
                    if (array[first] > array[second]) {
                        return 1;
                    }
                    return 0;
                }
            });
        }

        public static int[] reversePermutation(int[] permutation) {
            int[] result = new int[permutation.length];
            for (int i = 0; i < permutation.length; i++) {
                result[permutation[i]] = i;
            }
            return result;
        }

        public static void orderBy(int[] base, int[]... arrays) {
            int[] order = ArrayUtils.order(base);
            order(order, base);
            for (int[] array : arrays) {
                order(order, array);
            }
        }

        public static void orderBy(int[] base, char[]... arrays) {
            int[] order = ArrayUtils.order(base);
            order(order, base);
            for (char[] array : arrays) {
                order(order, array);
            }
        }

        public static void order(int[] order, int[] array) {
            int[] tempInt = new int[order.length];
            for (int i = 0; i < order.length; i++) {
                tempInt[i] = array[order[i]];
            }
            System.arraycopy(tempInt, 0, array, 0, array.length);
        }

        public static void order(int[] order, char[] array) {
            char[] tempChar = new char[order.length];
            for (int i = 0; i < order.length; i++) {
                tempChar[i] = array[order[i]];
            }
            System.arraycopy(tempChar, 0, array, 0, array.length);
        }

        public static int[] createArray(int count, int value) {
            int[] array = new int[count];
            Arrays.fill(array, value);
            return array;
        }

        public static int[] concatenate(int[] arr1, int[] arr2) {
            int[] result = Arrays.copyOf(arr1, arr1.length + arr2.length);
            System.arraycopy(arr2, 0, result, arr1.length, arr2.length);
            return result;
        }

    }

    static class IntArray extends IntAbstractStream implements IntList {
        private int[] data;

        public IntArray(int[] arr) {
            data = arr;
        }

        public int size() {
            return data.length;
        }

        public int get(int at) {
            return data[at];
        }

        public void addAt(int index, int value) {
            throw new UnsupportedOperationException();
        }

        public void removeAt(int index) {
            throw new UnsupportedOperationException();
        }

        public void set(int index, int value) {
            data[index] = value;
        }

    }

    static interface IntReversableCollection extends IntCollection {
    }

    static interface IntComparator {
        public int compare(int first, int second);

    }

    static interface IntStream extends Iterable<Integer>, Comparable<IntStream> {
        public IntIterator intIterator();

        default public Iterator<Integer> iterator() {
            return new Iterator<Integer>() {
                private IntIterator it = intIterator();

                public boolean hasNext() {
                    return it.isValid();
                }

                public Integer next() {
                    int result = it.value();
                    it.advance();
                    return result;
                }
            };
        }

        default public int compareTo(IntStream c) {
            IntIterator it = intIterator();
            IntIterator jt = c.intIterator();
            while (it.isValid() && jt.isValid()) {
                int i = it.value();
                int j = jt.value();
                if (i < j) {
                    return -1;
                } else if (i > j) {
                    return 1;
                }
                it.advance();
                jt.advance();
            }
            if (it.isValid()) {
                return 1;
            }
            if (jt.isValid()) {
                return -1;
            }
            return 0;
        }

    }

    static class IntArrayList extends IntAbstractStream implements IntList {
        private int size;
        private int[] data;

        public IntArrayList() {
            this(3);
        }

        public IntArrayList(int capacity) {
            data = new int[capacity];
        }

        public IntArrayList(IntCollection c) {
            this(c.size());
            addAll(c);
        }

        public IntArrayList(IntStream c) {
            this();
            if (c instanceof IntCollection) {
                ensureCapacity(((IntCollection) c).size());
            }
            addAll(c);
        }

        public IntArrayList(IntArrayList c) {
            size = c.size();
            data = c.data.clone();
        }

        public IntArrayList(int[] arr) {
            size = arr.length;
            data = arr.clone();
        }

        public int size() {
            return size;
        }

        public int get(int at) {
            if (at >= size) {
                throw new IndexOutOfBoundsException("at = " + at + ", size = " + size);
            }
            return data[at];
        }

        private void ensureCapacity(int capacity) {
            if (data.length >= capacity) {
                return;
            }
            capacity = Math.max(2 * data.length, capacity);
            data = Arrays.copyOf(data, capacity);
        }

        public void addAt(int index, int value) {
            ensureCapacity(size + 1);
            if (index > size || index < 0) {
                throw new IndexOutOfBoundsException("at = " + index + ", size = " + size);
            }
            if (index != size) {
                System.arraycopy(data, index, data, index + 1, size - index);
            }
            data[index] = value;
            size++;
        }

        public void removeAt(int index) {
            if (index >= size || index < 0) {
                throw new IndexOutOfBoundsException("at = " + index + ", size = " + size);
            }
            if (index != size - 1) {
                System.arraycopy(data, index + 1, data, index, size - index - 1);
            }
            size--;
        }

        public void set(int index, int value) {
            if (index >= size) {
                throw new IndexOutOfBoundsException("at = " + index + ", size = " + size);
            }
            data[index] = value;
        }

        public int[] toArray() {
            return Arrays.copyOf(data, size);
        }

    }
}

import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Random;
import java.util.TreeSet;

public final class CF_MailRu_2018_Practice_C2
{

	static boolean verb=true;
	static void log(Object X){if (verb) System.err.println(X);}
	static void log(Object[] X){if (verb) {for (Object U:X) System.err.print(U+" ");System.err.println("");}}
	static void log(int[] X){if (verb) {for (int U:X) System.err.print(U+" ");System.err.println("");}}
	static void log(int[] X,int L){if (verb) {for (int i=0;i<L;i++) System.err.print(X[i]+" ");System.err.println("");}}
	static void log(long[] X){if (verb) {for (long U:X) System.err.print(U+" ");System.err.println("");}}

	static void logWln(Object X){if (verb) System.err.print(X);}
	static void info(Object o){	System.out.println(o);}
	static void output(Object o){outputWln(""+o+"\n");	}
	static void outputWln(Object o){try {out.write(""+ o);} catch (Exception e) {}}

	static class State implements Comparable<State> {
		int value;
		int idx;
		int t;
		State anc;

		// first size
		// then time
		public int compareTo(State X){

			if (t!=X.t)
				return t-X.t;
			if (value!=X.value)
				return X.value-value;
			return idx-X.idx;
		}

		public State(int value, int idx, int t,State anc) {
			this.value = value;
			this.idx = idx;
			this.t = t;
			this.anc=anc;
		}

		public String toString(){
			return "val:"+value+" box:"+(idx+1)+" t:"+t;
		}

	}

	// Global vars
	static BufferedWriter out;
	static InputReader reader;

	static void process() throws Exception {

		out = new BufferedWriter(new OutputStreamWriter(System.out));
		reader=new InputReader(System.in);

		//for (int i=1;i<10;i++)
		//	solveSlow(i);

		int n=reader.readInt();
		int u=reader.readInt()-1;
		int k=reader.readInt();
		int w=0;
		int[] r=new int[n];
		for (int i=0;i<n;i++){
			r[i]=reader.readInt();
			if (r[i]>k)
				r[i]=k;
			//w+=r[i];
		}
		String co=reader.readString();
		int[] col=new int[n];
		for (int i=0;i<n;i++){
			char c=co.charAt(i);
			if (c=='G')
				col[i]=1;
			else if (c=='B')
				col[i]=2;
		}

		int[][] mem=new int[n][k+1];
		int[][] stack=new int[n*(k+1)][2];
		boolean[][] onstack=new boolean[n][k+1];

		int st=0;
		for (int v=0;v<n;v++){
			Arrays.fill(mem[v],Integer.MAX_VALUE);
		}
		for (int v=0;v<n;v++){
			stack[st][0]=v;
			stack[st][1]=r[v];
			mem[v][r[v]]=Math.abs(v-u);
			st++;
		}
		int best=Integer.MAX_VALUE;

		while (st>0){
			int[] tm=stack[--st];
			int a=tm[0];
			int b=tm[1];
			int t=mem[a][b];

			//log(a+" "+b+" "+mem[a][b]);
			onstack[a][b]=false;

			if (t<best){
				if (b==k && t<best){
					best=t;
				} else
					for (int aa=0;aa<n;aa++){
						if (r[aa]>r[a] && col[aa]!=col[a]){
							int bb=b+r[aa];
							if (bb>k)
								bb=k;
							int tt=t+Math.abs(aa-a);
							if (tt<mem[aa][bb] && tt<best){
								mem[aa][bb]=tt;
								if (!onstack[aa][bb]){
									onstack[aa][bb]=true;
									stack[st][0]=aa;
									stack[st][1]=bb;
									st++;
								}
							}
						}
					}
			}
		}

		if (best==Integer.MAX_VALUE)
			best=-1;
		output(best);
		/*
		if (tgt!=null){
			while (tgt!=null){
				log(tgt);
				tgt=tgt.anc;
			}

		}
		 */

		try {
			out.close();
		}
		catch (Exception EX){}

	}

	public static void main(String[] args) throws Exception {
		process();

	}

	static final class InputReader {
		private final InputStream stream;
		private final byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		private int read() throws IOException {
			if (curChar >= numChars) {
				curChar = 0;
				numChars = stream.read(buf);
				if (numChars <= 0) {
					return -1;
				}
			}
			return buf[curChar++];
		}

		public final String readString() throws IOException {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			StringBuilder res=new StringBuilder();
			do {
				res.append((char)c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public final int readInt() throws IOException {
			int c = read();
			boolean neg=false;
			while (isSpaceChar(c)) {
				c = read();
			}
			char d=(char)c;
			//log("d:"+d);
			if (d=='-') {
				neg=true;
				c = read();
			}
			int res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			//log("res:"+res);
			if (neg)
				return -res;
			return res;

		}

		public final long readLong() throws IOException {
			int c = read();
			boolean neg=false;
			while (isSpaceChar(c)) {
				c = read();
			}
			char d=(char)c;
			//log("d:"+d);
			if (d=='-') {
				neg=true;
				c = read();
			}
			long res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			//log("res:"+res);
			if (neg)
				return -res;
			return res;

		}

		private boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
	}

}

import java.util.*;
import static java.lang.Math.*;

import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.MathContext;

public class A {

	static class pair implements Comparable<pair> {
		int x;
		int y;

		public pair(int d, int k) {
			x = d;
			y = k;
		}

		@Override
		public int compareTo(pair arg0) {
			// TODO Auto-generated method stub
			if (x == arg0.x) {
				return y - arg0.y;
			}
			return x - arg0.x;
		}
	}

	static PrintWriter pw;
	static int n;
	static int m;

	static int[] a;

	static int bin(int num) {
		int s = 0;
		int e = a.length - 1;
		int ans = -1;
		while (s <= e) {
			int mid = (s + e) / 2;
			if (a[mid] <= num) {
				s = mid + 1;
				ans = mid;
			} else
				e = mid - 1;
		}
		return ans;
	}

	static int[][] memo;
	static pair[] p;

	static int dp(int idx, int r) {
		if (r <= 0)
			return 0;
		if (memo[idx][r] != -1)
			return memo[idx][r];
		int min = 1000000000;
		for (int i = 0; i < n; i++) {
			if (p[i].y > p[idx].y && p[i].x != p[idx].x)
				min = Math.min(min, Math.abs(i - idx) + dp(i, r - p[i].y));
		}

		return memo[idx][r] = min;
	}

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		pw = new PrintWriter(System.out);
		StringTokenizer st = new StringTokenizer(br.readLine());
		n = Integer.parseInt(st.nextToken());
		int s = Integer.parseInt(st.nextToken()) - 1;
		int k = Integer.parseInt(st.nextToken());
		p = new pair[n];
		st = new StringTokenizer(br.readLine());
		char[] a = br.readLine().toCharArray();
		for (int i = 0; i < p.length; i++) {
			int x = Integer.parseInt(st.nextToken());
			if (a[i] == 'R')
				p[i] = new pair(0, x);
			if (a[i] == 'G')
				p[i] = new pair(1, x);
			if (a[i] == 'B')
				p[i] = new pair(2, x);
		}
		memo = new int[n][k + 1];
		for (int j = 0; j < n; j++) {
			Arrays.fill(memo[j], -1);

		}
		int min = 1000000000;
		for (int i = 0; i < n; i++) {
			min = Math.min(min, Math.abs(i - s) + dp(i, k - p[i].y));
		}
//		System.out.println(1+dp(1,8));
		if (min == 1000000000)
			pw.println(-1);
		else

			pw.println(min);

		pw.flush();
		pw.close();

	}

	static boolean check(String s, int h, int m) {
		String s2 = reversString(m + "") + ":" + reversString(h + "");
		return s2.equals(com(h, m));

	}

	static String com(int h, int m) {
		String s = "";
		if (h < 10)
			s += "0" + h;
		else {
			s += h;
		}
		s += ":";
		if (m < 10)
			s += "0" + m;
		else {
			s += m;
		}
		return s;
	}

	static String reversString(String x) {
		int y = Integer.parseInt(x);
		if (y < 10)
			return x + "0";
		else
			return x.charAt(1) + "" + x.charAt(0);
	}

	static boolean[] vis;
	static ArrayList<Integer>[] g;
	static ArrayList<Integer> r;
	static int[] sta;
	static int[] end;

//	static void dfs(int n) {
//		vis[n] = true;
//		for (int v : g[n]) {
//			boolean f = false;
//			if (!vis[v]) {
//				p.add(new triple(n + 1, v + 1));
//				f = true;
//				dfs(v);
//				break;
//			}
//			if (!f) {
//				p.add(new triple(n + 1, g[n].get(0) + 1));
//			}
//		}
//	}

	static void bfs(int s) {
		Queue<triple> q = new LinkedList<triple>();
		q.add(new triple(s, 1, 0, 0));
		vis[s] = true;
		while (!q.isEmpty()) {
			triple p = q.remove();
			int u = p.x;
			int c = p.y;
			int even = p.z;
			int odd = p.w;
//			System.out.println(odd + " " + even);
			if (c == 0) {
				int l = even % 2 == 1 ? 1 - sta[u] : sta[u];
				if (l == end[u]) {
					for (int v : g[u]) {

						if (!vis[v]) {
							vis[v] = true;
							q.add(new triple(v, 1 - c, even, odd));
						}
					}

				} else {
					r.add(u + 1);
					even = 1 - even;
					for (int v : g[u]) {

						if (!vis[v]) {
							vis[v] = true;
							q.add(new triple(v, 1 - c, even, odd));
						}
					}
				}

			} else {
				int l = odd % 2 == 1 ? 1 - sta[u] : sta[u];
				if (l == end[u]) {
					for (int v : g[u]) {

						if (!vis[v]) {
							vis[v] = true;
							q.add(new triple(v, 1 - c, even, odd));
						}
					}

				} else {
					r.add(u + 1);
					odd = 1 - odd;
					for (int v : g[u]) {

						if (!vis[v]) {
							vis[v] = true;
							q.add(new triple(v, 1 - c, even, odd));
						}
					}
				}
			}
		}

	}

	static class triple implements Comparable<triple> {
		int x;
		int y;
		int z;
		int w;

		public triple(int a, int b, int c, int d) {
			x = a;
			y = b;
			z = c;
			w = d;
		}

		@Override
		public int compareTo(triple o) {
			// TODO Auto-generated method stub
			return y - o.y;
		}
	}

	static long pow(long a, long e) // O(log e)
	{
		long res = 1;
		while (e > 0) {
			if ((e & 1) == 1)
				res *= a;
			a *= a;
			e >>= 1;
		}
		return res;
	}

	static long gcd(long a, long b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Vadim Semenov
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static final class TaskC {
        public void solve(int __, InputReader in, PrintWriter out) {
            int boxes = in.nextInt();
            int start = in.nextInt() - 1;
            int want = in.nextInt();
            int[] candies = in.nextIntArray(boxes);
            char[] colors = in.next().toCharArray();
            TaskC.Box[] graph = new TaskC.Box[boxes];
            for (int i = 0; i < boxes; ++i) {
                graph[i] = new TaskC.Box(colors[i], candies[i], i, want);
            }
            int[] queue = new int[boxes];
            int head = 0;
            int tail = 0;
            for (int i = 0; i < boxes; ++i) {
                for (int j = 0; j < boxes; ++j) {
                    if (graph[i].candies < graph[j].candies && graph[i].color != graph[j].color) {
                        graph[i].outgoing++;
                        graph[j].previous.add(graph[i]);
                    }
                }
                if (graph[i].outgoing == 0) {
                    queue[tail++] = i;
                }
            }
            while (head < tail) {
                TaskC.Box box = graph[queue[head++]];
                for (TaskC.Box prev : box.previous) {
                    prev.relax(box);
                    prev.outgoing--;
                    if (prev.outgoing == 0) {
                        queue[tail++] = prev.position;
                    }
                }
            }
            int answer = TaskC.Box.INF;
            for (int i = 0; i < boxes; ++i) {
                answer = Math.min(answer, graph[i].dp[want] + Math.abs(i - start));
            }
            out.println(answer == TaskC.Box.INF ? -1 : answer);
        }

        static class Box {
            final static int INF = Integer.MAX_VALUE / 3;
            final char color;
            final int candies;
            final int position;
            final List<TaskC.Box> previous = new ArrayList<>();
            final int[] dp;
            int outgoing;

            Box(char color, int candies, int position, int want) {
                this.color = color;
                this.candies = candies;
                this.position = position;
                this.dp = new int[want + 1];
                Arrays.fill(dp, Math.min(dp.length, candies + 1), dp.length, INF);
            }

            void relax(TaskC.Box that) {
                assert this.color != that.color && this.candies < that.candies;
                int distance = Math.abs(this.position - that.position);
                for (int i = this.candies; i < dp.length; ++i) {
                    dp[i] = Math.min(dp[i], that.dp[i - this.candies] + distance);
                }
            }

        }

    }

    static class InputReader {
        private final BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
        }

        public int[] nextIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; ++i) {
                array[i] = nextInt();
            }
            return array;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                tokenizer = new StringTokenizer(readLine());
            }
            return tokenizer.nextToken();
        }

        public String readLine() {
            String line;
            try {
                line = reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return line;
        }

    }
}

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws FileNotFoundException {
        ConsoleIO io = new ConsoleIO(new InputStreamReader(System.in), new PrintWriter(System.out));

//        String fileName = "C-small-attempt0";
//        ConsoleIO io = new ConsoleIO(new FileReader("D:\\Dropbox\\code\\practice\\jb\\src\\" + fileName + ".in"), new PrintWriter(new File("D:\\Dropbox\\code\\practice\\jb\\src\\" + fileName + ".out")));

        new Main(io).solve();
//        new Main(io).solveLocal();

        io.close();
    }

    ConsoleIO io;

    Main(ConsoleIO io) {
        this.io = io;
    }

    ConsoleIO opt;

    Main(ConsoleIO io, ConsoleIO opt) {
        this.io = io;
        this.opt = opt;
    }

    List<List<Integer>> gr = new ArrayList<>();

    long MOD = 1_000_000_007;

    class Box{
        public Box(char color, int count, int idx){
            this.color = color == 'R' ? 0 : (color == 'G' ? 1 : 2);
            this.count = count;
            this.idx = idx;
        }
        public int color;
        public int count;
        public int idx;
    }

    public void solve() {
        int[] l = io.readIntArray();
        int n = l[0];
        int s = l[1] - 1;
        int k = l[2];
        int[] num = io.readIntArray();
        char[] col = io.readLine().toCharArray();
        Box[] all = new Box[n];
        int sum = 0;
        for(int i = 0;i<n;i++){
            all[i] = new Box(col[i], num[i], i);
            sum += num[i];
        }
        int maxCount = Math.max(k, sum);
        Arrays.sort(all, Comparator.comparingInt(a -> a.count));
        int[][] min = new int[n][maxCount+1];
        for(int i = 0;i<n;i++)
            for(int j = 0;j<=maxCount;j++)
                min[i][j] = Integer.MAX_VALUE / 3;
        for(int i = 0;i<n;i++) {
            Box b = all[i];
            min[i][b.count] = Math.min(min[i][b.count], Math.abs(s - b.idx));
            for (int j = 0; j < i; j++)
                if (b.count > all[j].count && b.color != all[j].color) {
                    for (int c = b.count; c <= maxCount; c++) {
                        min[i][c] = Math.min(min[i][c], min[j][c - b.count] + Math.abs(b.idx - all[j].idx));
                    }
                }
        }
        int res = Integer.MAX_VALUE/3;
        for(int i = 0;i<n;i++)
            for(int j = k; j<=maxCount;j++)
                res = Math.min(res, min[i][j]);
        io.writeLine((res==Integer.MAX_VALUE/3?-1:res)+"");
    }

}

class ConsoleIO {

    BufferedReader br;
    PrintWriter out;
    public ConsoleIO(Reader reader, PrintWriter writer){br = new BufferedReader(reader);out = writer;}
    public void flush(){this.out.flush();}
    public void close(){this.out.close();}
    public void writeLine(String s) {this.out.println(s);}
    public void writeInt(int a) {this.out.print(a);this.out.print(' ');}
    public void writeWord(String s){
        this.out.print(s);
    }
    public void writeIntArray(int[] a, int k, String separator) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < k; i++) {
            if (i > 0) sb.append(separator);
            sb.append(a[i]);
        }
        this.writeLine(sb.toString());
    }
    public int read(char[] buf, int len){try {return br.read(buf,0,len);}catch (Exception ex){ return -1; }}
    public String readLine() {try {return br.readLine();}catch (Exception ex){ return "";}}
    public long[] readLongArray() {
        String[]n=this.readLine().trim().split("\\s+");long[]r=new long[n.length];
        for(int i=0;i<n.length;i++)r[i]=Long.parseLong(n[i]);
        return r;
    }
    public int[] readIntArray() {
        String[]n=this.readLine().trim().split("\\s+");int[]r=new int[n.length];
        for(int i=0;i<n.length;i++)r[i]=Integer.parseInt(n[i]);
        return r;
    }
    public int[] readIntArray(int n) {
        int[] res = new int[n];
        char[] all = this.readLine().toCharArray();
        int cur = 0;boolean have = false;
        int k = 0;
        boolean neg = false;
        for(int i = 0;i<all.length;i++){
            if(all[i]>='0' && all[i]<='9'){
                cur = cur*10+all[i]-'0';
                have = true;
            }else if(all[i]=='-') {
                neg = true;
            }
            else if(have){
                res[k++] = neg?-cur:cur;
                cur = 0;
                have = false;
                neg = false;
            }
        }
        if(have)res[k++] = neg?-cur:cur;
        return res;
    }
    public int ri() {
        try {
            int r = 0;
            boolean start = false;
            boolean neg = false;
            while (true) {
                int c = br.read();
                if (c >= '0' && c <= '9') {
                    r = r * 10 + c - '0';
                    start = true;
                } else if (!start && c == '-') {
                    start = true;
                    neg = true;
                } else if (start || c == -1) return neg ? -r : r;
            }
        } catch (Exception ex) {
            return -1;
        }
    }
    public long readLong() {
        try {
            long r = 0;
            boolean start = false;
            boolean neg = false;
            while (true) {
                int c = br.read();
                if (c >= '0' && c <= '9') {
                    r = r * 10 + c - '0';
                    start = true;
                } else if (!start && c == '-') {
                    start = true;
                    neg = true;
                } else if (start || c == -1) return neg ? -r : r;
            }
        } catch (Exception ex) {
            return -1;
        }
    }
    public String readWord() {
        try {
            boolean start = false;
            StringBuilder sb = new StringBuilder();
            while (true) {
                int c = br.read();
                if (c!= ' ' && c!= '\r' && c!='\n' && c!='\t') {
                    sb.append((char)c);
                    start = true;
                } else if (start || c == -1) return sb.toString();
            }
        } catch (Exception ex) {
            return "";
        }
    }
    public char readSymbol() {
        try {
            while (true) {
                int c = br.read();
                if (c != ' ' && c != '\r' && c != '\n' && c != '\t') {
                    return (char) c;
                }
            }
        } catch (Exception ex) {
            return 0;
        }
    }
//public char readChar(){try {return (char)br.read();}catch (Exception ex){ return 0; }}
}
class Pair {
    public Pair(int a, int b) {this.a = a;this.b = b;}
    public int a;
    public int b;
}
class PairLL {
    public PairLL(long a, long b) {this.a = a;this.b = b;}
    public long a;
    public long b;
}
class Triple {
    public Triple(int a, int b, int c) {this.a = a;this.b = b;this.c = c;}
    public int a;
    public int b;
    public int c;
}

import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

import static java.lang.Math.abs;
import static java.lang.Math.min;

public class TanyaAndColoredCandies implements Closeable {

    private InputReader in = new InputReader(System.in);
    private PrintWriter out = new PrintWriter(System.out);

    public void solve() {
        n = in.ni();
        int start = in.ni() - 1, k = in.ni();
        candies = new int[n];
        for (int i = 0; i < n; i++) {
            candies[i] = in.ni();
        }
        char[] c = in.next().toCharArray();
        color = new int[n];
        for (int i = 0; i < n; i++) {
            if (c[i] == 'R') color[i] = 0;
            else if (c[i] == 'G') color[i] = 1;
            else color[i] = 2;
        }

        dp = new Integer[n][2001];
        int result = oo;
        for (int s = 0; s < n; s++) {
            int dist = abs(start - s);
            result = min(result, dist + recurse(s, k - candies[s]));
        }
        out.println(result == oo ? -1 : result);
    }

    private int n;
    private int oo = 10000;
    private int[] candies, color;
    private Integer[][] dp;

    private int recurse(int idx, int remaining) {
        if (remaining <= 0) return 0;
        if (dp[idx][remaining] != null) return dp[idx][remaining];

        int ans = oo;
        for (int next = 0; next < n; next++) {
            if (color[idx] != color[next] && candies[next] > candies[idx]) {
                int dist = abs(idx - next);
                ans = min(ans, dist + recurse(next, remaining - candies[next]));
            }
        }

        return dp[idx][remaining] = ans;
    }

    @Override
    public void close() throws IOException {
        in.close();
        out.close();
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int ni() {
            return Integer.parseInt(next());
        }

        public long nl() {
            return Long.parseLong(next());
        }

        public void close() throws IOException {
            reader.close();
        }
    }

    public static void main(String[] args) throws IOException {
        try (TanyaAndColoredCandies instance = new TanyaAndColoredCandies()) {
            instance.solve();
        }
    }
}

//package com.company;

import java.io.*;
import java.util.*;

public class Main {
    static long TIME_START, TIME_END;

    public static class Task {

        public class Box {
            int count;
            int color;
            int idx;

            public Box(int count, int color, int idx) {
                this.count = count;
                this.color = color;
                this.idx = idx;
            }
        }

        int n;
        int k;
        Box[] boxes;

        public int time(int prevAt) {
            int[][] dp = new int[n + 1][2501];
            for (int i = 0; i < dp.length; i++) {
                Arrays.fill(dp[i], Integer.MAX_VALUE / 2);
            }

            for (int i = 0; i < n; i++) {
                for (int j = -1; j < i; j++) {
                    int prev = j == -1 ? prevAt : boxes[j].idx;
                    int prevColor = j == -1 ? -1 : boxes[j].color;
                    int preCount = j == -1 ? 0 : boxes[j].count;
                    if (prevColor == boxes[i].color) continue;
                    if (preCount == boxes[i].count) continue;
                    int dist = Math.abs(boxes[i].idx - prev);
                    if (j == -1) {
                        dp[i][boxes[i].count] = Math.min(dp[i][boxes[i].count], dist);
                    } else {
                        for (int l = 0; l + boxes[i].count < 2501; l++) {
                            dp[i][l + boxes[i].count] = Math.min(dp[i][l + boxes[i].count], dp[j][l] + dist);
                        }
                    }
                }
            }
            int minS = Integer.MAX_VALUE / 2;
            for (int i = 0; i < n; i++) {
                for (int j = k; j < 2501; j++) {
                    minS = Math.min(minS, dp[i][j]);
                }
            }
            return minS >= Integer.MAX_VALUE / 2 ? -1 : minS;
        }

        public void solve(Scanner sc, PrintWriter pw) throws IOException {
            n = sc.nextInt();
            int s = sc.nextInt() - 1;
            k = sc.nextInt();
            boxes = new Box[n];
            for (int i = 0; i < n; i++) {
                int a = sc.nextInt();
                boxes[i] = new Box(a, -1, i);
            }
            String ss = sc.next();
            for (int i = 0; i < n; i++) {
                boxes[i].color = (int) ss.charAt(i);
            }
            Arrays.sort(boxes, new Comparator<Box>() {
                @Override
                public int compare(Box box, Box t1) {
                    return box.count - t1.count;
                }
            });
            int best = time(s);
            pw.println(best);
        }
    }

    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
//        Scanner sc = new Scanner(new FileInputStream("Test.in"));
        PrintWriter pw = new PrintWriter(System.out);
//        PrintWriter pw = new PrintWriter(new FileOutputStream("Test.in"));
//        PrintWriter pw = new PrintWriter(new FileOutputStream("Test.out"));
        Runtime runtime = Runtime.getRuntime();
        long usedMemoryBefore = runtime.totalMemory() - runtime.freeMemory();
        TIME_START = System.currentTimeMillis();
        Task t = new Task();
        t.solve(sc, pw);
        TIME_END = System.currentTimeMillis();
        long usedMemoryAfter = runtime.totalMemory() - runtime.freeMemory();
        pw.close();
        System.out.println("Memory increased:" + (usedMemoryAfter - usedMemoryBefore) / 1000000);
        System.out.println("Time used: " + (TIME_END - TIME_START) + ".");
    }

    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(FileReader s) throws FileNotFoundException {
            br = new BufferedReader(s);
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public boolean ready() throws IOException {
            return br.ready();
        }
    }
}

import java.util.*;
import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;

public class A {
	FastScanner in;
	PrintWriter out;
	boolean systemIO = true;

	public int gcd(int a, int b) {
		if (a == 0) {
			return b;
		}
		return gcd(b % a, a);
	}

	public class Pair implements Comparable<Pair> {
		int x;
		int y;

		public Pair(int x, int y) {
			this.x = x;
			this.y = y;
		}

		public int compareTo(Pair o) {
		    if (x != o.x) {
		        return x - o.x;
		    }
		    return y - o.y;
		}
	}

	public void solve() {
		int n = in.nextInt();
		int start = in.nextInt() - 1;
		int k = in.nextInt();
		Pair[] a = new Pair[n];
		int[] sweet = new int[n];
		TreeMap<Integer, Integer>[] map = new TreeMap[n];
		for (int i = 0; i < n; i++) {
		    sweet[i] = in.nextInt();
		    a[i] = new Pair(sweet[i], i);
		    map[i] = new TreeMap<>();
		}
		Arrays.sort(a);
		String s = in.next();
		for (int i = 0; i < n; i++) {
		    int x = a[i].y;
		    int y = a[i].x;
		    map[x].put(y, Math.abs(start - x));
		    for (int j = 0; j < n; j++) {
		        if (s.charAt(x) != s.charAt(j) && sweet[x] > sweet[j]) {
		            for (int x1 : map[j].keySet()) {
		                int y1 = map[j].get(x1);
		                int y2 = x1 + y;
		                int z = y1 + Math.abs(x- j);
		                if (map[x].containsKey(y2)) {
		                    map[x].put(y2, Math.min(map[x].get(y2), z));
		                } else {
		                    map[x].put(y2, z);
		                }
		            }
		        }
		    }
		}
		int ans = Integer.MAX_VALUE;
		for (int i = 0; i < n; i++) {
		    for (int x : map[i].keySet()) {
		    if (x >= k) {
		        ans = Math.min(ans, map[i].get(x));
		    }}
		}
		if (ans == Integer.MAX_VALUE) {
		    out.print(-1);
		} else {
		    out.print(ans);
		}
	}

	public void run() {
		try {
			if (systemIO) {
				in = new FastScanner(System.in);
				out = new PrintWriter(System.out);
			} else {
				in = new FastScanner(new File("input.txt"));
				out = new PrintWriter(new File("output.txt"));
			}
			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		FastScanner(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

		FastScanner(InputStream f) {
			br = new BufferedReader(new InputStreamReader(f));
		}

		String nextLine() {
			try {
				return br.readLine();
			} catch (IOException e) {
				return null;
			}
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

	}

	// AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
	public static void main(String[] arg) {
		new A().run();
	}
}

import java.io.*;
import java.util.*;

public class Main {

    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader inputReader = new InputReader(inputStream);
        PrintWriter printWriter = new PrintWriter(outputStream);
        Task task = new Task();
        task.run(inputReader, printWriter);
        printWriter.close();
    }

    static class Task {

        int n, s, k;
        int[] r;
        String color;
        int[][] dp;

        private void read(InputReader in) {
            n = in.nextInt();
            s = in.nextInt() - 1;
            k = in.nextInt();
            r = new int[n];
            for (int i = 0; i < n; ++i) {
                r[i] = in.nextInt();
            }
            color = in.next();
        }

        private void solve(PrintWriter out) {
            dp = new int[k + 1][n];
            for (int[] aDp : dp) {
                Arrays.fill(aDp, Integer.MAX_VALUE);
            }
            dp[0][s] = 0;
            for (int candies = 0; candies < k; ++candies) {
                for (int pos = 0; pos < n; ++pos) {
                    if (dp[candies][pos] == Integer.MAX_VALUE) {
                        continue;
                    }
                    for (int next = 0; next < n; ++next) {
                        if (candies == 0 || (r[next] > r[pos] && color.charAt(pos) != color.charAt(next))) {
                            int nextCandies = Math.min(k, candies + r[next]);
                            dp[nextCandies][next] = Math.min(dp[nextCandies][next], dp[candies][pos] + Math.abs(next - pos));
                        }
                    }
                }
            }
            int result = Arrays.stream(dp[k]).min().getAsInt();
            if (result == Integer.MAX_VALUE) {
                result = -1;
            }
            out.print(result);
        }

        void run(InputReader in, PrintWriter out) {
            read(in);
            solve(out);
        }
    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 1 << 15);
            tokenizer = null;
        }

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
    }
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.io.ObjectInputStream.GetField;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TimeZone;
import java.util.TreeMap;
import java.text.*;
public class Main {
	static int candy[]=new int[50];
	static int color[]=new int[50];
	static int memo[][]=new int[51][2001];
	static int n,k,s;
	public static void main(String[] args) throws IOException {
		FastReader in = new FastReader();
		PrintWriter out = new PrintWriter(System.out);
		n=in.nextInt();
		s=in.nextInt()-1;
		k=in.nextInt();
		for(int i=0;i<n;i++)
			candy[i]=in.nextInt();
		String str=in.nextLine();
		for(int i=0;i<n;i++) {
			char x  = str.charAt(i);
			color[i]=(x=='R')?0:(x=='G')?1:2;
		}

		for(int i=0;i<memo.length;i++)
			Arrays.fill(memo[i],-1);

		int min=1000000000;
		for(int i=0;i<n;i++)
			min=Math.min(min,Math.abs(i-s)+solve(i,k-candy[i]));

		if(min==1000000000)
			out.println(-1);
		else
			out.println(min);

		out.close();

	}
	public static int solve(int idx, int r) {
		if(r<=0)
			return 0;
		if(memo[idx][r]!=-1)
			return memo[idx][r];

		int min=1000000000;
		for(int i=0;i<n;i++)
			if(candy[i]>candy[idx]&&color[i]!=color[idx])
				min=Math.min(min,Math.abs(i-idx)+solve(i,r-candy[i]));

	return memo[idx][r]=min;

	}
}

class FastReader {
	BufferedReader br;
	StringTokenizer st;

	public FastReader() {
		br = new BufferedReader(new InputStreamReader(System.in));

	}

	String next() {
		while (st == null || !st.hasMoreElements()) {
			try {
				st = new StringTokenizer(br.readLine());

			} catch (IOException e) {
				e.printStackTrace();
			}

		}

		return st.nextToken();

	}

	int nextInt() {

		return Integer.parseInt(next());
	}

	double nextDouble() {

		return Double.parseDouble(next());
	}

	long nextLong() {

		return Long.parseLong(next());
	}

	String nextLine() {
		String str = "";
		try {
			str = br.readLine();

		} catch (IOException e) {

			e.printStackTrace();
		}
		return str;

	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
	static int candy[] = new int[50];
	static int color[] = new int[50];
	static int memo[][] = new int[51][2001];
	static int n, k, s;

	public static void main(String[] args) throws IOException {
		FastReader in = new FastReader();
		PrintWriter out = new PrintWriter(System.out);
		n = in.nextInt();
		s = in.nextInt() - 1;
		k = in.nextInt();
		for (int i = 0; i < n; i++)
			candy[i] = in.nextInt();
		String str = in.nextLine();
		for (int i = 0; i < n; i++) {
			char x = str.charAt(i);
			color[i] = (x == 'R') ? 0 : (x == 'G') ? 1 : 2;
		}

		for (int i = 0; i < memo.length; i++)
			Arrays.fill(memo[i], -1);

		int min = 1000000000;
		for (int i = 0; i < n; i++)
			min = Math.min(min, Math.abs(i - s) + solve(i, k - candy[i]));

		if (min == 1000000000)
			out.println(-1);
		else
			out.println(min);

		out.close();

	}

	public static int solve(int idx, int r) {
		if (r <= 0)
			return 0;
		if (memo[idx][r] != -1)
			return memo[idx][r];

		int min = 1000000000;
		for (int i = 0; i < n; i++)
			if (candy[i] > candy[idx] && color[i] != color[idx])
				min = Math.min(min, Math.abs(i - idx) + solve(i, r - candy[i]));

		return memo[idx][r] = min;

	}
}

class FastReader {
	BufferedReader br;
	StringTokenizer st;

	public FastReader() {
		br = new BufferedReader(new InputStreamReader(System.in));

	}

	String next() {
		while (st == null || !st.hasMoreElements()) {
			try {
				st = new StringTokenizer(br.readLine());

			} catch (IOException e) {
				e.printStackTrace();
			}

		}

		return st.nextToken();

	}

	int nextInt() {

		return Integer.parseInt(next());
	}

	double nextDouble() {

		return Double.parseDouble(next());
	}

	long nextLong() {

		return Long.parseLong(next());
	}

	String nextLine() {
		String str = "";
		try {
			str = br.readLine();

		} catch (IOException e) {

			e.printStackTrace();
		}
		return str;

	}
}

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;
import javafx.util.Pair;

public class Solve5 {

    public static void main(String[] args) throws IOException {
        PrintWriter pw = new PrintWriter(System.out);
        new Solve5().solve(pw);
        pw.flush();
        pw.close();
    }

    public void solve(PrintWriter pw) throws IOException {
        FastReader sc = new FastReader();
        int n = sc.nextInt(), s = sc.nextInt();
        k = sc.nextInt();
        r = new int[n + 1];
        adj = new ArrayList[n + 1];
        for (int i = 1; i <= n; i++) {
            r[i] = sc.nextInt();
            adj[i] = new ArrayList();
        }
        char[] c = sc.next().toCharArray();
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= n; j++) {
                if (r[i] < r[j] && c[i - 1] != c[j - 1]) {
                    adj[i].add(new Pair(j, Math.abs(i - j)));
                }
            }
        }
        dp = new int[n + 1][MAX];
        for (int[] row : dp) {
            Arrays.fill(row, -1);
        }
        int ans = MAX;
        for (int i = 1; i <= n; i++) {
            ans = Math.min(ans, dp(i, r[i]) + Math.abs(s - i));
        }
        pw.println(ans == MAX ? "-1" : ans);
    }
    final int MAX = 3000;
    int k;
    int[] r;
    ArrayList<Pair<Integer, Integer>>[] adj;
    int[][] dp;

    public int dp(int u, int sum) {
        if (sum >= k) {
            return 0;
        }
        if (dp[u][sum] != -1) {
            return dp[u][sum];
        }
        int y = MAX;
        for (Pair<Integer, Integer> pair : adj[u]) {
            int v = pair.getKey(), w = pair.getValue();
            y = Math.min(y, dp(v, sum + r[v]) + w);
        }
        return dp[u][sum] = y;
    }

    static class FastReader {

        StringTokenizer st;
        BufferedReader br;

        public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public FastReader(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (Exception e) {
            }
        }

        public String next() {
            if (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public boolean hasNext() throws IOException {
            if (st != null && st.hasMoreTokens()) {
                return true;
            }
            String s = br.readLine();
            if (s == null) {
                return false;
            }
            st = new StringTokenizer(s);
            return true;
        }
    }
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class C {

    private static final int oo = Integer.MAX_VALUE / 4;

    private void work() {
        Scanner sc = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        n = sc.nextInt();
        int s = sc.nextInt() - 1;
        k = sc.nextInt();

        r = new int[n];
        for (int i = 0; i < n; i++) r[i] = sc.nextInt();
        char[] c = sc.next().toCharArray();
        sc.close();

        deg = new int[n];
        g = new int[n][n];

        for (int i = 0; i < n; i++) {
            for (int j = i + 1; j < n; j++) {
                if (c[i] != c[j]) {
                    if (r[i] < r[j]) g[i][deg[i]++] = j;
                    if (r[i] > r[j]) g[j][deg[j]++] = i;
                }
            }
        }

        memo = new int[n][k];
        for(int i = 0; i < n; i++){
            Arrays.fill(memo[i], - 1);
        }

        int res = oo;
        for(int i = 0; i < n; i++){
            int t = Math.abs(i - s) + go(i, r[i]);
            if(t < res) res = t;
        }

        System.out.println(res == oo ? -1 : res);
    }

    private int n, k;
    private int[] r, deg;
    private int[][] g, memo;

    private int go(int u, int candies){
        if(candies >= k){
            return 0;
        }
        if(memo[u][candies] >= 0) return memo[u][candies];

        int ret = oo;
        for(int i = 0; i < deg[u]; i++){
            int v = g[u][i];
            int t = Math.abs(u - v) + go(v, candies + r[v]);
            if(t < ret) ret = t;
        }

        return memo[u][candies] = ret;
    }

    public static void main(String[] args) {
        new C().work();
    }
}

import java.util.Arrays;
import java.util.Scanner;

public class R0_task_C3 {
    static int n,s,k;
    static int allCount = 0;
    static int[]r;
    static char[]c;

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        n = in.nextInt();
        s = in.nextInt();
        k = in.nextInt();

        r = new int[n+1];
        r[0] = 0;
        for (int i = 1; i <= n; i++){
          r[i] = in.nextInt();
          allCount += r[i];
        }

        c = new char[n+1];
        String st = "*" + in.next();
        c = st.toCharArray();
        //-------------

        if (r[s] >= k)
            System.out.println(0);
        else{
            //long t0 = System.currentTimeMillis();

            TimeCalculator tc = new TimeCalculator();
            int time = tc.calc();
            //tc.print();

            System.out.println(time);
        }
    }

    static class TimeCalculator {
        static final int MAX_TIME = -1;//1 + 50 * (1 + 50) / 2;
        int[][] minTimes;
        int[][] moveTimes;
        static Box[] boxes;

        public TimeCalculator() {
            minTimes = new int [n + 1][allCount + 1];
            for (int i=0; i<=n; i++)
            for (int j=0; j<=allCount; j++)
                minTimes[i][j] = MAX_TIME;
            moveTimes = new int [n + 1][n + 1];

            boxes = new Box[n+1];
            for (int i=0; i<=n; i++)
                boxes[i] = new Box(i, r[i], c[i]);

            Arrays.sort(boxes);
            boxes[0].pos = s;
        }

        int calc(){
            int i,j;
            int time, eatCount;

            for (i = n; i >= 0; i--){
                for (j = i+1; j <= n; j++){

                    if (i == 0 || boxes[i].canMoveTo(boxes[j])){
                        //minTimes[i][j] = Math.abs(boxes[i].pos - boxes[j].pos);
                        moveTimes[i][j] = Math.abs(boxes[i].pos - boxes[j].pos);
                        //minTimes[i][boxes[j].count] = Math.abs(boxes[i].pos - boxes[j].pos);
                        updateTime(i, boxes[j].count, Math.abs(boxes[i].pos - boxes[j].pos));
                        for (int m = 1/*j+1*/; m <= allCount; m++){
                            //if (minTimes[j][m] > 0) {
                            //if (minTimes[j][m <= n ? boxes[m].count : m] > 0) {
                            //if (boxes[j].canMoveTo(boxes[m])){
                            if (minTimes[j][m] != MAX_TIME) {
                               eatCount = boxes[j].count + m; //(m <= n ? boxes[m].count : m);
                               //time = minTimes[i][j] + minTimes[j][m <= n ? boxes[m].count : m];//m];
                               time = moveTimes[i][j]/*minTimes[i][boxes[j].count] */+ minTimes[j][m];
                               updateTime(i, eatCount, time);
                           }
                        }
                    }
                }
            }

            time = -1;
            for (i = k; i <= allCount; i++){
                //if ((minTimes[0][i] != 0 || i <= n) && (time == -1 || minTimes[0][i] < time))
                if (minTimes[0][i] != MAX_TIME && (time == -1 || minTimes[0][i] < time))
                    time = minTimes[0][i];
            }
            return time;
        }

        private void updateTime(int row, int col, int value){
            if (minTimes[row][col] == MAX_TIME || value < minTimes[row][col])
                minTimes[row][col] = value;
        }

        public void print() {
            System.out.println("# R C 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0");
            System.out.println("-----+-----------------------------------------");
            /*for (int j = 0; j <= n; j++){
                 System.out.print(boxes[j].count);
                 System.out.print(' ');
            }
            System.out.println("\n______________________________________________");*/
            for (int i = 0; i <= n; i++){
                System.out.print(boxes[i].pos);System.out.print(' ');
                System.out.print(boxes[i].count);System.out.print(' ');
                System.out.print(boxes[i].color);System.out.print(' ');
                for (int j = 0; j <= allCount; j++){
                    if (/*minTimes[i][j]==0 || */minTimes[i][j]==MAX_TIME)
                        System.out.print(' ');
                    else
                        System.out.print(minTimes[i][j]);
                    System.out.print(' ');
                }
                System.out.println(' ');
            }
        }
    }

    static class Box implements Comparable<Box>{
        int pos;
        int count;
        char color;

        public Box(int pos, int count, char color) {
            this.pos = pos;
            this.count = count;
            this.color = color;
        }

        boolean canMoveTo(Box other){
            return count < other.count && color != other.color;
        }

        @Override
        public int compareTo(Box o) {
            return this.count - o.count;
        }
    }
}

import java.io.*;
import java.util.*;

import static java.lang.Math.*;
import static java.util.Arrays.*;

public class cf1057c {

    public static void main(String[] args) throws IOException {
        int n = rni(), s = ni() - 1, k = ni(), r[] = ria(n), clr[] = new int[n], dp[][] = new int[n][k + 1];
        char[] c = rcha();
        for (int i = 0; i < n; ++i) {
            if (c[i] == 'G') {
                clr[i] = 1;
            } else if (c[i] == 'B') {
                clr[i] = 2;
            }
        }
        int inf = n * n * n + 5;
        for (int[] row : dp) {
            fill(row, inf);
        }
        for (int i = 0; i < n; ++i) {
            dp[i][min(k, r[i])] = abs(s - i);
        }
        for (int i = 0; i < k; ++i) {
            for (int j = 0; j < n; ++j) {
                if (dp[j][i] != inf) {
                    for (int l = 0; l < n; ++l) {
                        if (clr[l] != clr[j] && r[l] > r[j]) {
                            dp[l][min(k, i + r[l])] = min(dp[l][min(k, i + r[l])], dp[j][i] + abs(j - l));
                        }
                    }
                }
            }
        }
        int ans = inf;
        for (int i = 0; i < n; ++i) {
            ans = min(ans, dp[i][k]);
        }
        if (ans == inf) {
            prln(-1);
        } else {
            prln(ans);
        }
        close();
    }

    static BufferedReader __in = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter __out = new PrintWriter(new OutputStreamWriter(System.out));
    static StringTokenizer input;
    static Random __rand = new Random();

    // references
    // IBIG = 1e9 + 7
    // IMAX ~= 2e9
    // LMAX ~= 9e18

    // constants
    static final int IBIG = 1000000007;
    static final int IMAX = 2147483647;
    static final int IMIN = -2147483648;
    static final long LMAX = 9223372036854775807L;
    static final long LMIN = -9223372036854775808L;
    // math util
    static int minof(int a, int b, int c) {return min(a, min(b, c));}
    static int minof(int... x) {if (x.length == 1) return x[0]; if (x.length == 2) return min(x[0], x[1]); if (x.length == 3) return min(x[0], min(x[1], x[2])); int min = x[0]; for (int i = 1; i < x.length; ++i) if (x[i] < min) min = x[i]; return min;}
    static long minof(long a, long b, long c) {return min(a, min(b, c));}
    static long minof(long... x) {if (x.length == 1) return x[0]; if (x.length == 2) return min(x[0], x[1]); if (x.length == 3) return min(x[0], min(x[1], x[2])); long min = x[0]; for (int i = 1; i < x.length; ++i) if (x[i] < min) min = x[i]; return min;}
    static int maxof(int a, int b, int c) {return max(a, max(b, c));}
    static int maxof(int... x) {if (x.length == 1) return x[0]; if (x.length == 2) return max(x[0], x[1]); if (x.length == 3) return max(x[0], max(x[1], x[2])); int max = x[0]; for (int i = 1; i < x.length; ++i) if (x[i] > max) max = x[i]; return max;}
    static long maxof(long a, long b, long c) {return max(a, max(b, c));}
    static long maxof(long... x) {if (x.length == 1) return x[0]; if (x.length == 2) return max(x[0], x[1]); if (x.length == 3) return max(x[0], max(x[1], x[2])); long max = x[0]; for (int i = 1; i < x.length; ++i) if (x[i] > max) max = x[i]; return max;}
    static int powi(int a, int b) {if (a == 0) return 0; int ans = 1; while (b > 0) {if ((b & 1) > 0) ans *= a; a *= a; b >>= 1;} return ans;}
    static long powl(long a, int b) {if (a == 0) return 0; long ans = 1; while (b > 0) {if ((b & 1) > 0) ans *= a; a *= a; b >>= 1;} return ans;}
    static int fli(double d) {return (int) d;}
    static int cei(double d) {return (int) ceil(d);}
    static long fll(double d) {return (long) d;}
    static long cel(double d) {return (long) ceil(d);}
    static int gcf(int a, int b) {return b == 0 ? a : gcf(b, a % b);}
    static long gcf(long a, long b) {return b == 0 ? a : gcf(b, a % b);}
    static int lcm(int a, int b) {return a * b / gcf(a, b);}
    static long lcm(long a, long b) {return a * b / gcf(a, b);}
    static int randInt(int min, int max) {return __rand.nextInt(max - min + 1) + min;}
    static long mix(long x) {x += 0x9e3779b97f4a7c15L; x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9L; x = (x ^ (x >> 27)) * 0x94d049bb133111ebL; return x ^ (x >> 31);}
    // array util
    static void reverse(int[] a) {for (int i = 0, n = a.length, half = n / 2; i < half; ++i) {int swap = a[i]; a[i] = a[n - i - 1]; a[n - i - 1] = swap;}}
    static void reverse(long[] a) {for (int i = 0, n = a.length, half = n / 2; i < half; ++i) {long swap = a[i]; a[i] = a[n - i - 1]; a[n - i - 1] = swap;}}
    static void reverse(double[] a) {for (int i = 0, n = a.length, half = n / 2; i < half; ++i) {double swap = a[i]; a[i] = a[n - i - 1]; a[n - i - 1] = swap;}}
    static void reverse(char[] a) {for (int i = 0, n = a.length, half = n / 2; i < half; ++i) {char swap = a[i]; a[i] = a[n - i - 1]; a[n - i - 1] = swap;}}
    static void shuffle(int[] a) {int n = a.length - 1; for (int i = 0; i < n; ++i) {int ind = randInt(i, n); int swap = a[i]; a[i] = a[ind]; a[ind] = swap;}}
    static void shuffle(long[] a) {int n = a.length - 1; for (int i = 0; i < n; ++i) {int ind = randInt(i, n); long swap = a[i]; a[i] = a[ind]; a[ind] = swap;}}
    static void shuffle(double[] a) {int n = a.length - 1; for (int i = 0; i < n; ++i) {int ind = randInt(i, n); double swap = a[i]; a[i] = a[ind]; a[ind] = swap;}}
    static void rsort(int[] a) {shuffle(a); sort(a);}
    static void rsort(long[] a) {shuffle(a); sort(a);}
    static void rsort(double[] a) {shuffle(a); sort(a);}
    static int[] copy(int[] a) {int[] ans = new int[a.length]; for (int i = 0; i < a.length; ++i) ans[i] = a[i]; return ans;}
    static long[] copy(long[] a) {long[] ans = new long[a.length]; for (int i = 0; i < a.length; ++i) ans[i] = a[i]; return ans;}
    static double[] copy(double[] a) {double[] ans = new double[a.length]; for (int i = 0; i < a.length; ++i) ans[i] = a[i]; return ans;}
    static char[] copy(char[] a) {char[] ans = new char[a.length]; for (int i = 0; i < a.length; ++i) ans[i] = a[i]; return ans;}
    // input
    static void r() throws IOException {input = new StringTokenizer(rline());}
    static int ri() throws IOException {return Integer.parseInt(rline());}
    static long rl() throws IOException {return Long.parseLong(rline());}
    static double rd() throws IOException {return Double.parseDouble(rline());}
    static int[] ria(int n) throws IOException {int[] a = new int[n]; r(); for (int i = 0; i < n; ++i) a[i] = ni(); return a;}
    static int[] riam1(int n) throws IOException {int[] a = new int[n]; r(); for (int i = 0; i < n; ++i) a[i] = ni() - 1; return a;}
    static long[] rla(int n) throws IOException {long[] a = new long[n]; r(); for (int i = 0; i < n; ++i) a[i] = nl(); return a;}
    static double[] rda(int n) throws IOException {double[] a = new double[n]; r(); for (int i = 0; i < n; ++i) a[i] = nd(); return a;}
    static char[] rcha() throws IOException {return rline().toCharArray();}
    static String rline() throws IOException {return __in.readLine();}
    static String n() {return input.nextToken();}
    static int rni() throws IOException {r(); return ni();}
    static int ni() {return Integer.parseInt(n());}
    static long rnl() throws IOException {r(); return nl();}
    static long nl() {return Long.parseLong(n());}
    static double rnd() throws IOException {r(); return nd();}
    static double nd() {return Double.parseDouble(n());}
    // output
    static void pr(int i) {__out.print(i);}
    static void prln(int i) {__out.println(i);}
    static void pr(long l) {__out.print(l);}
    static void prln(long l) {__out.println(l);}
    static void pr(double d) {__out.print(d);}
    static void prln(double d) {__out.println(d);}
    static void pr(char c) {__out.print(c);}
    static void prln(char c) {__out.println(c);}
    static void pr(char[] s) {__out.print(new String(s));}
    static void prln(char[] s) {__out.println(new String(s));}
    static void pr(String s) {__out.print(s);}
    static void prln(String s) {__out.println(s);}
    static void pr(Object o) {__out.print(o);}
    static void prln(Object o) {__out.println(o);}
    static void prln() {__out.println();}
    static void pryes() {prln("yes");}
    static void pry() {prln("Yes");}
    static void prY() {prln("YES");}
    static void prno() {prln("no");}
    static void prn() {prln("No");}
    static void prN() {prln("NO");}
    static boolean pryesno(boolean b) {prln(b ? "yes" : "no"); return b;};
    static boolean pryn(boolean b) {prln(b ? "Yes" : "No"); return b;}
    static boolean prYN(boolean b) {prln(b ? "YES" : "NO"); return b;}
    static void prln(int... a) {for (int i = 0, len = a.length - 1; i < len; pr(a[i]), pr(' '), ++i); if (a.length > 0) prln(a[a.length - 1]); else prln();}
    static void prln(long... a) {for (int i = 0, len = a.length - 1; i < len; pr(a[i]), pr(' '), ++i); if (a.length > 0) prln(a[a.length - 1]); else prln();}
    static void prln(double... a) {for (int i = 0, len = a.length - 1; i < len; pr(a[i]), pr(' '), ++i); if (a.length > 0) prln(a[a.length - 1]); else prln();}
    static <T> void prln(Collection<T> c) {int n = c.size() - 1; Iterator<T> iter = c.iterator(); for (int i = 0; i < n; pr(iter.next()), pr(' '), ++i); if (n >= 0) prln(iter.next()); else prln();}
    static void h() {prln("hlfd"); flush();}
    static void flush() {__out.flush();}
    static void close() {__out.close();}
}

import java.util.*;
import java.io.*;

public class C2018 {
    public static void main(String[] args) {
        MyScanner sc = new MyScanner();
        PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
        int n = sc.nextInt(); int s = sc.nextInt(); int k = sc.nextInt();
        int [] a = new int[n + 1];
        for (int i = 1; i <= n; i++) a[i] = sc.nextInt();
        String color = sc.next(); int [] c = new int[n + 1];
        for (int i = 1; i <= n; i++) c[i] = (color.charAt(i - 1) == 'R' ? 0 : (color.charAt(i - 1) == 'G' ? 1 : 2));
        int [][] dp = new int[n + 1][k + 1];
        for (int [] arr: dp) {
            Arrays.fill(arr, Integer.MAX_VALUE);
        }
        dp[s][a[s]] = 0;
        for (int i = 1; i <= n; i++) {
            dp[i][a[i]] = Math.abs(s - i);
        }
        for (int candies = 0; candies <= k; candies++) {
            for (int pos = 1; pos <= n; pos++) {
                if (dp[pos][candies] == Integer.MAX_VALUE) continue;
                for (int nextPos = 1; nextPos <= n; nextPos++) {
                    if (nextPos == pos) continue;
                    if (a[nextPos] > a[pos] && c[nextPos] != c[pos]) {
                        int newTotal = Math.min(k, candies + a[nextPos]);
                        dp[nextPos][newTotal] = Math.min(dp[nextPos][newTotal], Math.abs(pos - nextPos) + dp[pos][candies]);
                    }
                }
            }
        }
        int ans = Integer.MAX_VALUE;
        for (int i = 1; i <= n; i++) ans = Math.min(ans, dp[i][k]);
        out.println(ans == Integer.MAX_VALUE ? -1 : ans);
        out.close();
    }

    //-----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }

}

import java.util.Arrays;
import java.util.Scanner;

public class R0_task_C3 {
    static int n,s,k;
    static int allCount = 0;
    static int[]r;
    static char[]c;

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        n = in.nextInt();
        s = in.nextInt();
        k = in.nextInt();

        r = new int[n+1];
        r[0] = 0;
        for (int i = 1; i <= n; i++){
          r[i] = in.nextInt();
          allCount += r[i];
        }

        c = new char[n+1];
        String st = "*" + in.next();
        c = st.toCharArray();
        //-------------

        if (r[s] >= k)
            System.out.println(0);
        else{
            //long t0 = System.currentTimeMillis();

            TimeCalculator tc = new TimeCalculator();
            int time = tc.calc();
            //tc.print();

            System.out.println(time);
        }
    }

    static class TimeCalculator {
        static final int MAX_TIME = 1 + 50 * (1 + 50) / 2;
        int[][] minTimes;
        int[][] moveTimes;
        static Box[] boxes;

        public TimeCalculator() {
            minTimes = new int [n + 1][allCount + 1];
            for (int i=0; i<=n; i++)
            for (int j=0; j<=allCount; j++)
                minTimes[i][j] = MAX_TIME;
            moveTimes = new int [n + 1][n + 1];

            boxes = new Box[n+1];
            for (int i=0; i<=n; i++)
                boxes[i] = new Box(i, r[i], c[i]);

            Arrays.sort(boxes);
            boxes[0].pos = s;
        }

        int calc(){
            int i,j;
            int time, eatCount;

            for (i = n; i >= 0; i--){
                for (j = i+1; j <= n; j++){

                    if (i == 0 || boxes[i].canMoveTo(boxes[j])){
                        //minTimes[i][j] = Math.abs(boxes[i].pos - boxes[j].pos);
                        moveTimes[i][j] = Math.abs(boxes[i].pos - boxes[j].pos);
                        //minTimes[i][boxes[j].count] = Math.abs(boxes[i].pos - boxes[j].pos);
                        updateTime(i, boxes[j].count, Math.abs(boxes[i].pos - boxes[j].pos));
                        for (int m = 1/*j+1*/; m <= allCount; m++){
                            //if (minTimes[j][m] > 0) {
                            //if (minTimes[j][m <= n ? boxes[m].count : m] > 0) {
                            //if (boxes[j].canMoveTo(boxes[m])){
                            if (minTimes[j][m] != MAX_TIME) {
                               eatCount = boxes[j].count + m; //(m <= n ? boxes[m].count : m);
                               //time = minTimes[i][j] + minTimes[j][m <= n ? boxes[m].count : m];//m];
                               time = minTimes[i][boxes[j].count] + minTimes[j][m];
                               updateTime(i, eatCount, time);
                           }
                        }
                    }
                }
            }

            time = -1;
            for (i = k; i <= allCount; i++){
                //if ((minTimes[0][i] != 0 || i <= n) && (time == -1 || minTimes[0][i] < time))
                if ((time == -1 || minTimes[0][i] < time))
                    time = minTimes[0][i];
            }
            return time;
        }

        private void updateTime(int row, int col, int value){
            if (/*minTimes[row][col] == 0 ||*/ value < minTimes[row][col])
                minTimes[row][col] = value;
        }

        public void print() {
            System.out.println("# R C 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0");
            System.out.println("-----+-----------------------------------------");
            /*for (int j = 0; j <= n; j++){
                 System.out.print(boxes[j].count);
                 System.out.print(' ');
            }
            System.out.println("\n______________________________________________");*/
            for (int i = 0; i <= n; i++){
                System.out.print(boxes[i].pos);System.out.print(' ');
                System.out.print(boxes[i].count);System.out.print(' ');
                System.out.print(boxes[i].color);System.out.print(' ');
                for (int j = 0; j <= allCount; j++){
                    if (/*minTimes[i][j]==0 || */minTimes[i][j]==MAX_TIME)
                        System.out.print(' ');
                    else
                        System.out.print(minTimes[i][j]);
                    System.out.print(' ');
                }
                System.out.println(' ');
            }
        }
    }

    static class Box implements Comparable<Box>{
        int pos;
        int count;
        char color;

        public Box(int pos, int count, char color) {
            this.pos = pos;
            this.count = count;
            this.color = color;
        }

        boolean canMoveTo(Box other){
            return count < other.count && color != other.color;
        }

        @Override
        public int compareTo(Box o) {
            return this.count - o.count;
        }
    }
}

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class C {

	static StringTokenizer st;
	static BufferedReader br;
	static PrintWriter pw;
	public static void main(String[] args) throws IOException {
		br = new BufferedReader(new InputStreamReader(System.in));
		pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = nextInt();
		int s = nextInt();
		int k = nextInt();
		int[]sweets = new int[n + 1];
		int[]place = new int[n + 1];
		for (int i = 1; i <= n; i++) {
			sweets[i] = nextInt();
			place[i] = i;
		}
		String col = next();
		char[]colors = new char[n+1];
		for (int i = 1; i <= n; i++) {
			colors[i] = col.charAt(i-1);
		}
		for (int i = 1; i <= n; i++) {
			for (int j = i+1; j <= n; j++) {
				if (sweets[i] > sweets[j]) {
					int t = sweets[i];
					sweets[i] = sweets[j];
					sweets[j] = t;

					t = place[i];
					place[i] = place[j];
					place[j] = t;

					char w = colors[i];
					colors[i] = colors[j];
					colors[j] = w;
				}
			}
		}
		int from = 0;
		for (int i = 1; i <= n; i++) {
			if (place[i]==s) {
				from = i;
			}
		}
		int[][]dp = new int[n+1][2501];
		int INF = (int) 1e9;
		for (int i = 1; i <= n; i++) {
			Arrays.fill(dp[i], INF);
		}
		for (int i = 1; i <= n; i++) {
			dp[i][sweets[i]] = Math.abs(from-i);
			for (int j = 1; j < i; j++) {
				if (colors[j] != colors[i] && sweets[i] > sweets[j]) {
					for (int j2 = sweets[i]; j2 <= 2500; j2++) {
						dp[i][j2] = Math.min(dp[i][j2], dp[j][j2-sweets[i]] + i-j);
					}
				}
			}
		}
		int ans = INF;
		for (int i = 1; i <= n; i++) {
			for (int j = k; j <= 2500; j++) {
				ans = Math.min(ans, dp[i][j]);
			}
		}
		if (ans==INF) {
			ans = -1;
		}
		System.out.println(ans);
		pw.close();
	}
	private static int nextInt() throws IOException {
		return Integer.parseInt(next());
	}
	private static long nextLong() throws IOException {
		return Long.parseLong(next());
	}
	private static double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}
	private static String next() throws IOException {
		while (st==null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}
}

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class C {

	static StringTokenizer st;
	static BufferedReader br;
	static PrintWriter pw;
	public static void main(String[] args) throws IOException {
		br = new BufferedReader(new InputStreamReader(System.in));
		pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = nextInt();
		int s = nextInt();
		int k = nextInt();
		int[]sweets = new int[n + 1];
		int[]place = new int[n + 1];
		for (int i = 1; i <= n; i++) {
			sweets[i] = nextInt();
			place[i] = i;
		}
		String col = next();
		char[]colors = new char[n+1];
		for (int i = 1; i <= n; i++) {
			colors[i] = col.charAt(i-1);
		}
		for (int i = 1; i <= n; i++) {
			for (int j = i+1; j <= n; j++) {
				if (sweets[i] > sweets[j]) {
					int t = sweets[i];
					sweets[i] = sweets[j];
					sweets[j] = t;

					t = place[i];
					place[i] = place[j];
					place[j] = t;

					char w = colors[i];
					colors[i] = colors[j];
					colors[j] = w;
				}
			}
		}
		int from = 0;
		for (int i = 1; i <= n; i++) {
			if (place[i]==s) {
				from = i;
			}
		}
		int[][]dp = new int[n+1][2501];
		int INF = (int) 1e9;
		for (int i = 1; i <= n; i++) {
			Arrays.fill(dp[i], INF);
		}
		for (int i = 1; i <= n; i++) {
			dp[i][sweets[i]] = Math.abs(from-i);
			for (int j = 1; j < i; j++) {
				if (colors[j] != colors[i]) {
					for (int j2 = sweets[i]; j2 <= 2500; j2++) {
						dp[i][j2] = Math.min(dp[i][j2], dp[j][j2-sweets[i]] + i-j);
					}
				}
			}
		}
		int ans = INF;
		for (int i = 1; i <= n; i++) {
			for (int j = k; j <= 2500; j++) {
				ans = Math.min(ans, dp[i][j]);
			}
		}
		if (ans==INF) {
			ans = -1;
		}
		System.out.println(ans);
		pw.close();
	}
	private static int nextInt() throws IOException {
		return Integer.parseInt(next());
	}
	private static long nextLong() throws IOException {
		return Long.parseLong(next());
	}
	private static double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}
	private static String next() throws IOException {
		while (st==null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}
}

import java.util.*;
import static java.lang.Math.*;

import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.MathContext;

public class A {

	static class pair implements Comparable<pair> {
		int x;
		int y;

		public pair(int d, int k) {
			x = d;
			y = k;
		}

		@Override
		public int compareTo(pair arg0) {
			// TODO Auto-generated method stub
			if (x == arg0.x) {
				return y - arg0.y;
			}
			return x - arg0.x;
		}
	}

	static PrintWriter pw;
	static int n;
	static int m;

	static int[] a;

	static int bin(int num) {
		int s = 0;
		int e = a.length - 1;
		int ans = -1;
		while (s <= e) {
			int mid = (s + e) / 2;
			if (a[mid] <= num) {
				s = mid + 1;
				ans = mid;
			} else
				e = mid - 1;
		}
		return ans;
	}

	static int[][] memo;
	static pair[] p;

	static int dp(int idx, int r) {
		if (r <= 0)
			return 0;
		if (idx == n)
			return (int) 1e9;
		if (memo[idx][r] != -1)
			return memo[idx][r];
		int min = 1000000000;
		for (int i = 0; i < n; i++) {
			if (p[i].y > p[idx].y && p[i].x != p[idx].x)
				min = Math.min(min, Math.abs(i - idx) + dp(i, r - p[i].y));
		}

		return memo[idx][r] = min;
	}

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		pw = new PrintWriter(System.out);
		StringTokenizer st = new StringTokenizer(br.readLine());
		n = Integer.parseInt(st.nextToken());
		int s = Integer.parseInt(st.nextToken());
		int k = Integer.parseInt(st.nextToken()) - 1;
		p = new pair[n];
		st = new StringTokenizer(br.readLine());
		char[] a = br.readLine().toCharArray();
		for (int i = 0; i < p.length; i++) {
			int x = Integer.parseInt(st.nextToken());
			if (a[i] == 'R')
				p[i] = new pair(0, x);
			if (a[i] == 'G')
				p[i] = new pair(1, x);
			if (a[i] == 'B')
				p[i] = new pair(2, x);
		}
		memo = new int[n + 1][k + 1];
		for (int j = 0; j < n; j++) {
			Arrays.fill(memo[j], -1);

		}
		int min = 1000000000;
		for (int i = 0; i < n; i++) {
			min = Math.min(min, Math.abs(i - s) + dp(i, k - p[i].y));
		}
//		System.out.println(1+dp(1,8));
		if (min == 1000000000)
			pw.println(-1);
		else

			pw.println(min);

		pw.flush();
		pw.close();

	}

	static boolean check(String s, int h, int m) {
		String s2 = reversString(m + "") + ":" + reversString(h + "");
		return s2.equals(com(h, m));

	}

	static String com(int h, int m) {
		String s = "";
		if (h < 10)
			s += "0" + h;
		else {
			s += h;
		}
		s += ":";
		if (m < 10)
			s += "0" + m;
		else {
			s += m;
		}
		return s;
	}

	static String reversString(String x) {
		int y = Integer.parseInt(x);
		if (y < 10)
			return x + "0";
		else
			return x.charAt(1) + "" + x.charAt(0);
	}

	static boolean[] vis;
	static ArrayList<Integer>[] g;
	static ArrayList<Integer> r;
	static int[] sta;
	static int[] end;

//	static void dfs(int n) {
//		vis[n] = true;
//		for (int v : g[n]) {
//			boolean f = false;
//			if (!vis[v]) {
//				p.add(new triple(n + 1, v + 1));
//				f = true;
//				dfs(v);
//				break;
//			}
//			if (!f) {
//				p.add(new triple(n + 1, g[n].get(0) + 1));
//			}
//		}
//	}

	static void bfs(int s) {
		Queue<triple> q = new LinkedList<triple>();
		q.add(new triple(s, 1, 0, 0));
		vis[s] = true;
		while (!q.isEmpty()) {
			triple p = q.remove();
			int u = p.x;
			int c = p.y;
			int even = p.z;
			int odd = p.w;
//			System.out.println(odd + " " + even);
			if (c == 0) {
				int l = even % 2 == 1 ? 1 - sta[u] : sta[u];
				if (l == end[u]) {
					for (int v : g[u]) {

						if (!vis[v]) {
							vis[v] = true;
							q.add(new triple(v, 1 - c, even, odd));
						}
					}

				} else {
					r.add(u + 1);
					even = 1 - even;
					for (int v : g[u]) {

						if (!vis[v]) {
							vis[v] = true;
							q.add(new triple(v, 1 - c, even, odd));
						}
					}
				}

			} else {
				int l = odd % 2 == 1 ? 1 - sta[u] : sta[u];
				if (l == end[u]) {
					for (int v : g[u]) {

						if (!vis[v]) {
							vis[v] = true;
							q.add(new triple(v, 1 - c, even, odd));
						}
					}

				} else {
					r.add(u + 1);
					odd = 1 - odd;
					for (int v : g[u]) {

						if (!vis[v]) {
							vis[v] = true;
							q.add(new triple(v, 1 - c, even, odd));
						}
					}
				}
			}
		}

	}

	static class triple implements Comparable<triple> {
		int x;
		int y;
		int z;
		int w;

		public triple(int a, int b, int c, int d) {
			x = a;
			y = b;
			z = c;
			w = d;
		}

		@Override
		public int compareTo(triple o) {
			// TODO Auto-generated method stub
			return y - o.y;
		}
	}

	static long pow(long a, long e) // O(log e)
	{
		long res = 1;
		while (e > 0) {
			if ((e & 1) == 1)
				res *= a;
			a *= a;
			e >>= 1;
		}
		return res;
	}

	static long gcd(long a, long b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

}

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws FileNotFoundException {
        ConsoleIO io = new ConsoleIO(new InputStreamReader(System.in), new PrintWriter(System.out));

//        String fileName = "C-small-attempt0";
//        ConsoleIO io = new ConsoleIO(new FileReader("D:\\Dropbox\\code\\practice\\jb\\src\\" + fileName + ".in"), new PrintWriter(new File("D:\\Dropbox\\code\\practice\\jb\\src\\" + fileName + ".out")));

        new Main(io).solve();
//        new Main(io).solveLocal();

        io.close();
    }

    ConsoleIO io;

    Main(ConsoleIO io) {
        this.io = io;
    }

    ConsoleIO opt;

    Main(ConsoleIO io, ConsoleIO opt) {
        this.io = io;
        this.opt = opt;
    }

    List<List<Integer>> gr = new ArrayList<>();

    long MOD = 1_000_000_007;

    class Box{
        public Box(char color, int count, int idx){
            this.color = color == 'R' ? 0 : (color == 'G' ? 1 : 2);
            this.count = count;
            this.idx = idx;
        }
        public int color;
        public int count;
        public int idx;
    }

    public void solve() {
        int[] l = io.readIntArray();
        int n = l[0];
        int s = l[1] - 1;
        int k = l[2];
        int[] num = io.readIntArray();
        char[] col = io.readLine().toCharArray();
        Box[] all = new Box[n];
        int maxCount = k;
        for(int i = 0;i<n;i++){
            all[i] = new Box(col[i], num[i], i);
            maxCount = Math.max(maxCount, num[i]);
        }
        Arrays.sort(all, Comparator.comparingInt(a -> a.count));
        int[][] min = new int[n][maxCount+1];
        for(int i = 0;i<n;i++)
            for(int j = 0;j<=maxCount;j++)
                min[i][j] = Integer.MAX_VALUE / 3;
        for(int i = 0;i<n;i++) {
            Box b = all[i];
            min[i][b.count] = Math.min(min[i][b.count], Math.abs(s - b.idx));
            for (int j = 0; j < i; j++)
                if (b.color != all[j].color) {
                    for (int c = b.count; c <= maxCount; c++) {
                        min[i][c] = Math.min(min[i][c], min[j][c - b.count] + Math.abs(b.idx - all[j].idx));
                    }
                }
        }
        int res = Integer.MAX_VALUE/3;
        for(int i = 0;i<n;i++)
            for(int j = k; j<=maxCount;j++)
                res = Math.min(res, min[i][j]);
        io.writeLine((res==Integer.MAX_VALUE/3?-1:res)+"");
    }

}

class ConsoleIO {

    BufferedReader br;
    PrintWriter out;
    public ConsoleIO(Reader reader, PrintWriter writer){br = new BufferedReader(reader);out = writer;}
    public void flush(){this.out.flush();}
    public void close(){this.out.close();}
    public void writeLine(String s) {this.out.println(s);}
    public void writeInt(int a) {this.out.print(a);this.out.print(' ');}
    public void writeWord(String s){
        this.out.print(s);
    }
    public void writeIntArray(int[] a, int k, String separator) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < k; i++) {
            if (i > 0) sb.append(separator);
            sb.append(a[i]);
        }
        this.writeLine(sb.toString());
    }
    public int read(char[] buf, int len){try {return br.read(buf,0,len);}catch (Exception ex){ return -1; }}
    public String readLine() {try {return br.readLine();}catch (Exception ex){ return "";}}
    public long[] readLongArray() {
        String[]n=this.readLine().trim().split("\\s+");long[]r=new long[n.length];
        for(int i=0;i<n.length;i++)r[i]=Long.parseLong(n[i]);
        return r;
    }
    public int[] readIntArray() {
        String[]n=this.readLine().trim().split("\\s+");int[]r=new int[n.length];
        for(int i=0;i<n.length;i++)r[i]=Integer.parseInt(n[i]);
        return r;
    }
    public int[] readIntArray(int n) {
        int[] res = new int[n];
        char[] all = this.readLine().toCharArray();
        int cur = 0;boolean have = false;
        int k = 0;
        boolean neg = false;
        for(int i = 0;i<all.length;i++){
            if(all[i]>='0' && all[i]<='9'){
                cur = cur*10+all[i]-'0';
                have = true;
            }else if(all[i]=='-') {
                neg = true;
            }
            else if(have){
                res[k++] = neg?-cur:cur;
                cur = 0;
                have = false;
                neg = false;
            }
        }
        if(have)res[k++] = neg?-cur:cur;
        return res;
    }
    public int ri() {
        try {
            int r = 0;
            boolean start = false;
            boolean neg = false;
            while (true) {
                int c = br.read();
                if (c >= '0' && c <= '9') {
                    r = r * 10 + c - '0';
                    start = true;
                } else if (!start && c == '-') {
                    start = true;
                    neg = true;
                } else if (start || c == -1) return neg ? -r : r;
            }
        } catch (Exception ex) {
            return -1;
        }
    }
    public long readLong() {
        try {
            long r = 0;
            boolean start = false;
            boolean neg = false;
            while (true) {
                int c = br.read();
                if (c >= '0' && c <= '9') {
                    r = r * 10 + c - '0';
                    start = true;
                } else if (!start && c == '-') {
                    start = true;
                    neg = true;
                } else if (start || c == -1) return neg ? -r : r;
            }
        } catch (Exception ex) {
            return -1;
        }
    }
    public String readWord() {
        try {
            boolean start = false;
            StringBuilder sb = new StringBuilder();
            while (true) {
                int c = br.read();
                if (c!= ' ' && c!= '\r' && c!='\n' && c!='\t') {
                    sb.append((char)c);
                    start = true;
                } else if (start || c == -1) return sb.toString();
            }
        } catch (Exception ex) {
            return "";
        }
    }
    public char readSymbol() {
        try {
            while (true) {
                int c = br.read();
                if (c != ' ' && c != '\r' && c != '\n' && c != '\t') {
                    return (char) c;
                }
            }
        } catch (Exception ex) {
            return 0;
        }
    }
//public char readChar(){try {return (char)br.read();}catch (Exception ex){ return 0; }}
}
class Pair {
    public Pair(int a, int b) {this.a = a;this.b = b;}
    public int a;
    public int b;
}
class PairLL {
    public PairLL(long a, long b) {this.a = a;this.b = b;}
    public long a;
    public long b;
}
class Triple {
    public Triple(int a, int b, int c) {this.a = a;this.b = b;this.c = c;}
    public int a;
    public int b;
    public int c;
}

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws FileNotFoundException {
        ConsoleIO io = new ConsoleIO(new InputStreamReader(System.in), new PrintWriter(System.out));

//        String fileName = "C-small-attempt0";
//        ConsoleIO io = new ConsoleIO(new FileReader("D:\\Dropbox\\code\\practice\\jb\\src\\" + fileName + ".in"), new PrintWriter(new File("D:\\Dropbox\\code\\practice\\jb\\src\\" + fileName + ".out")));

        new Main(io).solve();
//        new Main(io).solveLocal();

        io.close();
    }

    ConsoleIO io;

    Main(ConsoleIO io) {
        this.io = io;
    }

    ConsoleIO opt;

    Main(ConsoleIO io, ConsoleIO opt) {
        this.io = io;
        this.opt = opt;
    }

    List<List<Integer>> gr = new ArrayList<>();

    long MOD = 1_000_000_007;

    class Box{
        public Box(char color, int count, int idx){
            this.color = color == 'R' ? 0 : (color == 'G' ? 1 : 2);
            this.count = count;
            this.idx = idx;
        }
        public int color;
        public int count;
        public int idx;
    }

    public void solve() {
        int[] l = io.readIntArray();
        int n = l[0];
        int s = l[1] - 1;
        int k = l[2];
        int[] num = io.readIntArray();
        char[] col = io.readLine().toCharArray();
        Box[] all = new Box[n];
        int maxCount = k;
        for(int i = 0;i<n;i++){
            all[i] = new Box(col[i], num[i], i);
            maxCount = Math.max(maxCount, num[i]);
        }
        Arrays.sort(all, Comparator.comparingInt(a -> a.count));
        int[][] min = new int[n][maxCount+1];
        for(int i = 0;i<n;i++)
            for(int j = 0;j<=maxCount;j++)
                min[i][j] = Integer.MAX_VALUE / 3;
        for(int i = 0;i<n;i++) {
            Box b = all[i];
            min[i][b.count] = Math.min(min[i][b.count], Math.abs(s - b.idx));
            for (int j = 0; j < i; j++)
                if (b.count > all[j].count && b.color != all[j].color) {
                    for (int c = b.count; c <= maxCount; c++) {
                        min[i][c] = Math.min(min[i][c], min[j][c - b.count] + Math.abs(b.idx - all[j].idx));
                    }
                }
        }
        int res = Integer.MAX_VALUE/3;
        for(int i = 0;i<n;i++)
            for(int j = k; j<=maxCount;j++)
                res = Math.min(res, min[i][j]);
        io.writeLine((res==Integer.MAX_VALUE/3?-1:res)+"");
    }

}

class ConsoleIO {

    BufferedReader br;
    PrintWriter out;
    public ConsoleIO(Reader reader, PrintWriter writer){br = new BufferedReader(reader);out = writer;}
    public void flush(){this.out.flush();}
    public void close(){this.out.close();}
    public void writeLine(String s) {this.out.println(s);}
    public void writeInt(int a) {this.out.print(a);this.out.print(' ');}
    public void writeWord(String s){
        this.out.print(s);
    }
    public void writeIntArray(int[] a, int k, String separator) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < k; i++) {
            if (i > 0) sb.append(separator);
            sb.append(a[i]);
        }
        this.writeLine(sb.toString());
    }
    public int read(char[] buf, int len){try {return br.read(buf,0,len);}catch (Exception ex){ return -1; }}
    public String readLine() {try {return br.readLine();}catch (Exception ex){ return "";}}
    public long[] readLongArray() {
        String[]n=this.readLine().trim().split("\\s+");long[]r=new long[n.length];
        for(int i=0;i<n.length;i++)r[i]=Long.parseLong(n[i]);
        return r;
    }
    public int[] readIntArray() {
        String[]n=this.readLine().trim().split("\\s+");int[]r=new int[n.length];
        for(int i=0;i<n.length;i++)r[i]=Integer.parseInt(n[i]);
        return r;
    }
    public int[] readIntArray(int n) {
        int[] res = new int[n];
        char[] all = this.readLine().toCharArray();
        int cur = 0;boolean have = false;
        int k = 0;
        boolean neg = false;
        for(int i = 0;i<all.length;i++){
            if(all[i]>='0' && all[i]<='9'){
                cur = cur*10+all[i]-'0';
                have = true;
            }else if(all[i]=='-') {
                neg = true;
            }
            else if(have){
                res[k++] = neg?-cur:cur;
                cur = 0;
                have = false;
                neg = false;
            }
        }
        if(have)res[k++] = neg?-cur:cur;
        return res;
    }
    public int ri() {
        try {
            int r = 0;
            boolean start = false;
            boolean neg = false;
            while (true) {
                int c = br.read();
                if (c >= '0' && c <= '9') {
                    r = r * 10 + c - '0';
                    start = true;
                } else if (!start && c == '-') {
                    start = true;
                    neg = true;
                } else if (start || c == -1) return neg ? -r : r;
            }
        } catch (Exception ex) {
            return -1;
        }
    }
    public long readLong() {
        try {
            long r = 0;
            boolean start = false;
            boolean neg = false;
            while (true) {
                int c = br.read();
                if (c >= '0' && c <= '9') {
                    r = r * 10 + c - '0';
                    start = true;
                } else if (!start && c == '-') {
                    start = true;
                    neg = true;
                } else if (start || c == -1) return neg ? -r : r;
            }
        } catch (Exception ex) {
            return -1;
        }
    }
    public String readWord() {
        try {
            boolean start = false;
            StringBuilder sb = new StringBuilder();
            while (true) {
                int c = br.read();
                if (c!= ' ' && c!= '\r' && c!='\n' && c!='\t') {
                    sb.append((char)c);
                    start = true;
                } else if (start || c == -1) return sb.toString();
            }
        } catch (Exception ex) {
            return "";
        }
    }
    public char readSymbol() {
        try {
            while (true) {
                int c = br.read();
                if (c != ' ' && c != '\r' && c != '\n' && c != '\t') {
                    return (char) c;
                }
            }
        } catch (Exception ex) {
            return 0;
        }
    }
//public char readChar(){try {return (char)br.read();}catch (Exception ex){ return 0; }}
}
class Pair {
    public Pair(int a, int b) {this.a = a;this.b = b;}
    public int a;
    public int b;
}
class PairLL {
    public PairLL(long a, long b) {this.a = a;this.b = b;}
    public long a;
    public long b;
}
class Triple {
    public Triple(int a, int b, int c) {this.a = a;this.b = b;this.c = c;}
    public int a;
    public int b;
    public int c;
}

//package com.company;

import java.io.*;
import java.util.*;

public class Main {
    static long TIME_START, TIME_END;

    public static class Task {

        public class Box {
            int count;
            int color;
            int idx;

            public Box(int count, int color, int idx) {
                this.count = count;
                this.color = color;
                this.idx = idx;
            }
        }

        int n;
        int k;
        Box[] boxes;

        public int time(int prevAt) {
            int[][] dp = new int[n + 1][2501];
            for (int i = 0; i < dp.length; i++) {
                Arrays.fill(dp[i], Integer.MAX_VALUE / 2);
            }

            for (int i = 0; i < n; i++) {
                for (int j = -1; j < i; j++) {
                    int prev = j == -1 ? prevAt : boxes[j].idx;
                    int prevColor = j == -1 ? -1 : boxes[j].color;
                    if (prevColor == boxes[i].color) continue;
                    int dist = Math.abs(boxes[i].idx - prev);
                    if (j == -1) {
                        dp[i][boxes[i].count] = Math.min(dp[i][boxes[i].count], dist);
                    } else {
                        for (int l = 0; l + boxes[i].count < 2501; l++) {
                            dp[i][l + boxes[i].count] = Math.min(dp[i][l + boxes[i].count], dp[j][l] + dist);
                        }
                    }
                }
            }
            int minS = Integer.MAX_VALUE / 2;
            for (int i = 0; i < n; i++) {
                for (int j = k; j < 2501; j++) {
                    minS = Math.min(minS, dp[i][j]);
                }
            }
            return minS >= Integer.MAX_VALUE / 2 ? -1 : minS;
        }

        public void solve(Scanner sc, PrintWriter pw) throws IOException {
            n = sc.nextInt();
            int s = sc.nextInt() - 1;
            k = sc.nextInt();
            boxes = new Box[n];
            for (int i = 0; i < n; i++) {
                int a = sc.nextInt();
                boxes[i] = new Box(a, -1, i);
            }
            String ss = sc.next();
            for (int i = 0; i < n; i++) {
                boxes[i].color = (int) ss.charAt(i);
            }
            Arrays.sort(boxes, new Comparator<Box>() {
                @Override
                public int compare(Box box, Box t1) {
                    return box.count - t1.count;
                }
            });
            int best = time(s);
            pw.println(best);
        }
    }

    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
//        Scanner sc = new Scanner(new FileInputStream("Test.in"));
        PrintWriter pw = new PrintWriter(System.out);
//        PrintWriter pw = new PrintWriter(new FileOutputStream("Test.in"));
//        PrintWriter pw = new PrintWriter(new FileOutputStream("Test.out"));
        Runtime runtime = Runtime.getRuntime();
        long usedMemoryBefore = runtime.totalMemory() - runtime.freeMemory();
        TIME_START = System.currentTimeMillis();
        Task t = new Task();
        t.solve(sc, pw);
        TIME_END = System.currentTimeMillis();
        long usedMemoryAfter = runtime.totalMemory() - runtime.freeMemory();
        pw.close();
        System.out.println("Memory increased:" + (usedMemoryAfter - usedMemoryBefore) / 1000000);
        System.out.println("Time used: " + (TIME_END - TIME_START) + ".");
    }

    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(FileReader s) throws FileNotFoundException {
            br = new BufferedReader(s);
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public boolean ready() throws IOException {
            return br.ready();
        }
    }
}

import java.util.*;
import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;

public class A {
	FastScanner in;
	PrintWriter out;
	boolean systemIO = true;

	public int gcd(int a, int b) {
		if (a == 0) {
			return b;
		}
		return gcd(b % a, a);
	}

	public class Pair implements Comparable<Pair> {
		int x;
		int y;

		public Pair(int x, int y) {
			this.x = x;
			this.y = y;
		}

		public int compareTo(Pair o) {
		    if (x != o.x) {
		        return x - o.x;
		    }
		    return y - o.y;
		}
	}

	public void solve() {
		int n = in.nextInt();
		int start = in.nextInt() - 1;
		int k = in.nextInt();
		Pair[] a = new Pair[n];
		int[] sweet = new int[n];
		TreeMap<Integer, Integer>[] map = new TreeMap[n];
		for (int i = 0; i < n; i++) {
		    sweet[i] = in.nextInt();
		    a[i] = new Pair(sweet[i], i);
		    map[i] = new TreeMap<>();
		}
		Arrays.sort(a);
		String s = in.next();
		for (int i = 0; i < n; i++) {
		    int x = a[i].y;
		    int y = a[i].x;
		    map[x].put(y, Math.abs(start - x));
		    for (int j = 0; j < n; j++) {
		        if (s.charAt(x) != s.charAt(j) && sweet[x] > sweet[j]) {
		            for (int x1 : map[j].keySet()) {
		                int y1 = map[j].get(x1);
		                int y2 = x1 + y;
		                int z = y1 + Math.abs(x- j);
		                if (map[x].containsKey(y2)) {
		                    map[x].put(y2, Math.min(map[x].get(y2), z));
		                } else {
		                    map[x].put(y2, z);
		                }
		            }
		        }
		    }
		}
		int ans = Integer.MAX_VALUE;
		for (int i = 0; i < n; i++) {
		    Integer x = map[i].higherKey(k - 1);
		    if (x != null) {
		        ans = Math.min(ans, map[i].get(x));
		    }
		}
		if (ans == Integer.MAX_VALUE) {
		    out.print(-1);
		} else {
		    out.print(ans);
		}
	}

	public void run() {
		try {
			if (systemIO) {
				in = new FastScanner(System.in);
				out = new PrintWriter(System.out);
			} else {
				in = new FastScanner(new File("input.txt"));
				out = new PrintWriter(new File("output.txt"));
			}
			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		FastScanner(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

		FastScanner(InputStream f) {
			br = new BufferedReader(new InputStreamReader(f));
		}

		String nextLine() {
			try {
				return br.readLine();
			} catch (IOException e) {
				return null;
			}
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

	}

	// AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
	public static void main(String[] arg) {
		new A().run();
	}
}

import java.util.*;
import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;

public class A {
	FastScanner in;
	PrintWriter out;
	boolean systemIO = true;

	public int gcd(int a, int b) {
		if (a == 0) {
			return b;
		}
		return gcd(b % a, a);
	}

	public class Pair implements Comparable<Pair> {
		int x;
		int y;

		public Pair(int x, int y) {
			this.x = x;
			this.y = y;
		}

		public int compareTo(Pair o) {
		    if (x != o.x) {
		        return x - o.x;
		    }
		    return y - o.y;
		}
	}

	public void solve() {
		int n = in.nextInt();
		int start = in.nextInt() - 1;
		int k = in.nextInt();
		Pair[] a = new Pair[n];
		int[] sweet = new int[n];
		TreeMap<Integer, Integer>[] map = new TreeMap[n];
		for (int i = 0; i < n; i++) {
		    sweet[i] = in.nextInt();
		    a[i] = new Pair(sweet[i], i);
		    map[i] = new TreeMap<>();
		}
		Arrays.sort(a);
		String s = in.next();
		for (int i = 0; i < n; i++) {
		    int x = a[i].y;
		    int y = a[i].x;
		    map[x].put(y, Math.abs(start - x));
		    for (int j = 0; j < n; j++) {
		        if (s.charAt(i) != s.charAt(j) && sweet[i] > sweet[j]) {
		            for (int x1 : map[j].keySet()) {
		                int y1 = map[j].get(x1);
		                int y2 = x1 + y;
		                int z = y1 + Math.abs(i - j);
		                if (map[x].containsKey(y2)) {
		                    map[x].put(y2, Math.min(map[x].get(y2), z));
		                } else {
		                    map[x].put(y2, z);
		                }
		            }
		        }
		    }
		}
		int ans = Integer.MAX_VALUE;
		for (int i = 0; i < n; i++) {
		    Integer x = map[i].higherKey(k - 1);
		    if (x != null) {
		        ans = Math.min(ans, map[i].get(x));
		    }
		}
		if (ans == Integer.MAX_VALUE) {
		    out.print(-1);
		} else {
		    out.print(ans);
		}
	}

	public void run() {
		try {
			if (systemIO) {
				in = new FastScanner(System.in);
				out = new PrintWriter(System.out);
			} else {
				in = new FastScanner(new File("input.txt"));
				out = new PrintWriter(new File("output.txt"));
			}
			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		FastScanner(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

		FastScanner(InputStream f) {
			br = new BufferedReader(new InputStreamReader(f));
		}

		String nextLine() {
			try {
				return br.readLine();
			} catch (IOException e) {
				return null;
			}
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

	}

	// AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
	public static void main(String[] arg) {
		new A().run();
	}
}

import java.util.*;
import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;

public class A {
	FastScanner in;
	PrintWriter out;
	boolean systemIO = true;

	public int gcd(int a, int b) {
		if (a == 0) {
			return b;
		}
		return gcd(b % a, a);
	}

	public class Pair implements Comparable<Pair> {
		int x;
		int y;

		public Pair(int x, int y) {
			this.x = x;
			this.y = y;
		}

		public int compareTo(Pair o) {
		    if (x != o.x) {
		        return x - o.x;
		    }
		    return y - o.y;
		}
	}

	public void solve() {
		int n = in.nextInt();
		int start = in.nextInt() - 1;
		int k = in.nextInt();
		Pair[] a = new Pair[n];
		int[] sweet = new int[n];
		TreeMap<Integer, Integer>[] map = new TreeMap[n];
		for (int i = 0; i < n; i++) {
		    sweet[i] = in.nextInt();
		    a[i] = new Pair(sweet[i], i);
		    map[i] = new TreeMap<>();
		}
		Arrays.sort(a);
		String s = in.next();
		for (int i = 0; i < n; i++) {
		    int x = a[i].y;
		    int y = a[i].x;
		    map[x].put(y, Math.abs(start - x));
		    for (int j = 0; j < n; j++) {
		        if (s.charAt(i) != s.charAt(j) && sweet[i] > sweet[j]) {
		            for (int x1 : map[j].keySet()) {
		                int y1 = map[j].get(x1);
		                int y2 = x1 + y;
		                int z = y1 + Math.abs(x- j);
		                if (map[x].containsKey(y2)) {
		                    map[x].put(y2, Math.min(map[x].get(y2), z));
		                } else {
		                    map[x].put(y2, z);
		                }
		            }
		        }
		    }
		}
		int ans = Integer.MAX_VALUE;
		for (int i = 0; i < n; i++) {
		    Integer x = map[i].higherKey(k - 1);
		    if (x != null) {
		        ans = Math.min(ans, map[i].get(x));
		    }
		}
		if (ans == Integer.MAX_VALUE) {
		    out.print(-1);
		} else {
		    out.print(ans);
		}
	}

	public void run() {
		try {
			if (systemIO) {
				in = new FastScanner(System.in);
				out = new PrintWriter(System.out);
			} else {
				in = new FastScanner(new File("input.txt"));
				out = new PrintWriter(new File("output.txt"));
			}
			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		FastScanner(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

		FastScanner(InputStream f) {
			br = new BufferedReader(new InputStreamReader(f));
		}

		String nextLine() {
			try {
				return br.readLine();
			} catch (IOException e) {
				return null;
			}
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

	}

	// AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
	public static void main(String[] arg) {
		new A().run();
	}
}

import java.io.*;
import java.util.*;

public class Main {

    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader inputReader = new InputReader(inputStream);
        PrintWriter printWriter = new PrintWriter(outputStream);
        Task task = new Task();
        task.run(inputReader, printWriter);
        printWriter.close();
    }

    static class Task {

        int n, s, k;
        int[] r;
        String color;
        int[][] dp;

        private void read(InputReader in) {
            n = in.nextInt();
            s = in.nextInt() - 1;
            k = in.nextInt();
            r = new int[n];
            for (int i = 0; i < n; ++i) {
                r[i] = in.nextInt();
            }
            color = in.next();
        }

        private void solve(PrintWriter out) {
            dp = new int[k + 1][n];
            for (int[] aDp : dp) {
                Arrays.fill(aDp, Integer.MAX_VALUE);
            }
            dp[0][s] = 0;
            for (int candies = 0; candies < k; ++candies) {
                for (int pos = 0; pos < n; ++pos) {
                    if (dp[candies][pos] == Integer.MAX_VALUE) {
                        continue;
                    }
                    for (int next = 0; next < n; ++next) {
                        if ((candies == 0 || r[next] > r[pos]) && color.charAt(pos) != color.charAt(next)) {
                            int nextCandies = Math.min(k, candies + r[next]);
                            dp[nextCandies][next] = Math.min(dp[nextCandies][next], dp[candies][pos] + Math.abs(next - pos));
                        }
                    }
                }
            }
            int result = Arrays.stream(dp[k]).min().getAsInt();
            if (result == Integer.MAX_VALUE) {
                result = -1;
            }
            out.print(result);
        }

        void run(InputReader in, PrintWriter out) {
            read(in);
            solve(out);
        }
    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 1 << 15);
            tokenizer = null;
        }

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
    }
}

import java.util.Arrays;
import java.util.Scanner;

public class R0_task_C2 {
    static int n,s,k;
    static int allCount = 0;
    static int[]r;
    static char[]c;

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        n = in.nextInt();
        s = in.nextInt();
        k = in.nextInt();

        r = new int[n+1];
        r[0] = 0;
        for (int i = 1; i <= n; i++){
          r[i] = in.nextInt();
          allCount += r[i];
        }

        c = new char[n+1];
        String st = "*" + in.next();
        c = st.toCharArray();
        //-------------

        int time;

        //long t0 = System.currentTimeMillis();

        TimeCalculator tc = new TimeCalculator();
        time = tc.calc();
        //tc.print();

        System.out.println(time);
    }

    static class TimeCalculator {
        int[][] minTimes;
        static Box[] boxes;

        public TimeCalculator() {
            minTimes = new int [n + 1][allCount + 1];

            boxes = new Box[n+1];
            for (int i=0; i<=n; i++)
                boxes[i] = new Box(i, r[i], c[i]);

            Arrays.sort(boxes);
            boxes[0].pos = s;
        }

        int calc(){
            int i,j;
            int time, eatCount;

            for (i = n; i >= 0; i--){
                for (j = i+1; j <= n; j++){

                    if (i == 0 || boxes[i].canMoveTo(boxes[j])){
                        minTimes[i][j] = Math.abs(boxes[i].pos - boxes[j].pos);

                        for (int m = j+1; m <= allCount; m++){
                           if (minTimes[j][m] > 0) {
                               eatCount = boxes[j].count + (m <= n ? boxes[m].count : m);
                               time = minTimes[i][j] + minTimes[j][m];
                               updateTime(i, eatCount, time);
                           }
                        }
                    }
                }
            }

            time = -1;
            for (i = k; i <= allCount; i++){
                if ((minTimes[0][i] != 0 || i <= n) && (time == -1 || minTimes[0][i] < time))
                    time = minTimes[0][i];
            }
            return time;
        }

        private void updateTime(int row, int col, int value){
            if (minTimes[row][col] == 0 || value < minTimes[row][col])
                minTimes[row][col] = value;
        }

        public void print() {
            System.out.println("0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0");
            System.out.println("-----------------------------------------");
            for (int j = 0; j <= n; j++){
                 System.out.print(r[boxes[j].pos]);
                 System.out.print(' ');
            }
            System.out.println("\n_________________________________________");
            for (int i = 0; i <= n; i++){
                for (int j = 0; j <= allCount; j++){
                    if (minTimes[i][j]==0)
                        System.out.print(' ');
                    else
                        System.out.print(minTimes[i][j]);
                    System.out.print(' ');
                }
                System.out.println(' ');
            }
        }
    }

    static class Box implements Comparable<Box>{
        int pos;
        int count;
        char color;

        public Box(int pos, int count, char color) {
            this.pos = pos;
            this.count = count;
            this.color = color;
        }

        boolean canMoveTo(Box other){
            return count < other.count && color != other.color;
        }

        @Override
        public int compareTo(Box o) {
            return this.count - o.count;
        }
    }
}

import java.util.Arrays;
import java.util.Scanner;

public class R0_task_C3 {
    static int n,s,k;
    static int allCount = 0;
    static int[]r;
    static char[]c;

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        n = in.nextInt();
        s = in.nextInt();
        k = in.nextInt();

        r = new int[n+1];
        r[0] = 0;
        for (int i = 1; i <= n; i++){
          r[i] = in.nextInt();
          allCount += r[i];
        }

        c = new char[n+1];
        String st = "*" + in.next();
        c = st.toCharArray();
        //-------------

        if (r[s] >= k)
            System.out.println(0);
        else{
            //long t0 = System.currentTimeMillis();

            TimeCalculator tc = new TimeCalculator();
            int time = tc.calc();
            tc.print();

            System.out.println(time);
        }
    }

    static class TimeCalculator {
        static final int MAX_TIME = -1;//1 + 50 * (1 + 50) / 2;
        int[][] minTimes;
        int[][] moveTimes;
        static Box[] boxes;

        public TimeCalculator() {
            minTimes = new int [n + 1][allCount + 1];
            for (int i=0; i<=n; i++)
            for (int j=0; j<=allCount; j++)
                minTimes[i][j] = MAX_TIME;
            moveTimes = new int [n + 1][n + 1];

            boxes = new Box[n+1];
            for (int i=0; i<=n; i++)
                boxes[i] = new Box(i, r[i], c[i]);

            Arrays.sort(boxes);
            boxes[0].pos = s;
        }

        int calc(){
            int i,j;
            int time, eatCount;

            for (i = n; i >= 0; i--){
                for (j = i+1; j <= n; j++){

                    if (i == 0 || boxes[i].canMoveTo(boxes[j])){
                        //minTimes[i][j] = Math.abs(boxes[i].pos - boxes[j].pos);
                        moveTimes[i][j] = Math.abs(boxes[i].pos - boxes[j].pos);
                        //minTimes[i][boxes[j].count] = Math.abs(boxes[i].pos - boxes[j].pos);
                        updateTime(i, boxes[j].count, Math.abs(boxes[i].pos - boxes[j].pos));
                        for (int m = 1/*j+1*/; m <= allCount; m++){
                            //if (minTimes[j][m] > 0) {
                            //if (minTimes[j][m <= n ? boxes[m].count : m] > 0) {
                            //if (boxes[j].canMoveTo(boxes[m])){
                            if (minTimes[j][m] != MAX_TIME) {
                               eatCount = boxes[j].count + m; //(m <= n ? boxes[m].count : m);
                               //time = minTimes[i][j] + minTimes[j][m <= n ? boxes[m].count : m];//m];
                               time = moveTimes[i][j]/*minTimes[i][boxes[j].count] */+ minTimes[j][m];
                               updateTime(i, eatCount, time);
                           }
                        }
                    }
                }
            }

            time = -1;
            for (i = k; i <= allCount; i++){
                //if ((minTimes[0][i] != 0 || i <= n) && (time == -1 || minTimes[0][i] < time))
                if (minTimes[0][i] != MAX_TIME && (time == -1 || minTimes[0][i] < time))
                    time = minTimes[0][i];
            }
            return time;
        }

        private void updateTime(int row, int col, int value){
            if (minTimes[row][col] == MAX_TIME || value < minTimes[row][col])
                minTimes[row][col] = value;
        }

        public void print() {
            System.out.println("# R C 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0");
            System.out.println("-----+-----------------------------------------");
            /*for (int j = 0; j <= n; j++){
                 System.out.print(boxes[j].count);
                 System.out.print(' ');
            }
            System.out.println("\n______________________________________________");*/
            for (int i = 0; i <= n; i++){
                System.out.print(boxes[i].pos);System.out.print(' ');
                System.out.print(boxes[i].count);System.out.print(' ');
                System.out.print(boxes[i].color);System.out.print(' ');
                for (int j = 0; j <= allCount; j++){
                    if (/*minTimes[i][j]==0 || */minTimes[i][j]==MAX_TIME)
                        System.out.print(' ');
                    else
                        System.out.print(minTimes[i][j]);
                    System.out.print(' ');
                }
                System.out.println(' ');
            }
        }
    }

    static class Box implements Comparable<Box>{
        int pos;
        int count;
        char color;

        public Box(int pos, int count, char color) {
            this.pos = pos;
            this.count = count;
            this.color = color;
        }

        boolean canMoveTo(Box other){
            return count < other.count && color != other.color;
        }

        @Override
        public int compareTo(Box o) {
            return this.count - o.count;
        }
    }
}

import java.util.Arrays;
import java.util.Scanner;

public class R0_task_C3 {
    static int n,s,k;
    static int allCount = 0;
    static int[]r;
    static char[]c;

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        n = in.nextInt();
        s = in.nextInt();
        k = in.nextInt();

        r = new int[n+1];
        r[0] = 0;
        for (int i = 1; i <= n; i++){
          r[i] = in.nextInt();
          allCount += r[i];
        }

        c = new char[n+1];
        String st = "*" + in.next();
        c = st.toCharArray();
        //-------------

        if (r[s] >= k)
            System.out.println(0);
        else{
            //long t0 = System.currentTimeMillis();

            TimeCalculator tc = new TimeCalculator();
            int time = tc.calc();
            //tc.print();

            System.out.println(time);
        }
    }

    static class TimeCalculator {
        static final int MAX_TIME = -1;//1 + 50 * (1 + 50) / 2;
        int[][] minTimes;
        int[][] moveTimes;
        static Box[] boxes;

        public TimeCalculator() {
            minTimes = new int [n + 1][allCount + 1];
            for (int i=0; i<=n; i++)
            for (int j=0; j<=allCount; j++)
                minTimes[i][j] = MAX_TIME;
            moveTimes = new int [n + 1][n + 1];

            boxes = new Box[n+1];
            for (int i=0; i<=n; i++)
                boxes[i] = new Box(i, r[i], c[i]);

            Arrays.sort(boxes);
            boxes[0].pos = s;
        }

        int calc(){
            int i,j;
            int time, eatCount;

            for (i = n; i >= 0; i--){
                for (j = i+1; j <= n; j++){

                    if (i == 0 || boxes[i].canMoveTo(boxes[j])){
                        //minTimes[i][j] = Math.abs(boxes[i].pos - boxes[j].pos);
                        moveTimes[i][j] = Math.abs(boxes[i].pos - boxes[j].pos);
                        //minTimes[i][boxes[j].count] = Math.abs(boxes[i].pos - boxes[j].pos);
                        updateTime(i, boxes[j].count, Math.abs(boxes[i].pos - boxes[j].pos));
                        for (int m = 1/*j+1*/; m <= allCount; m++){
                            //if (minTimes[j][m] > 0) {
                            //if (minTimes[j][m <= n ? boxes[m].count : m] > 0) {
                            //if (boxes[j].canMoveTo(boxes[m])){
                            if (minTimes[j][m] != MAX_TIME) {
                               eatCount = boxes[j].count + m; //(m <= n ? boxes[m].count : m);
                               //time = minTimes[i][j] + minTimes[j][m <= n ? boxes[m].count : m];//m];
                               time = minTimes[i][boxes[j].count] + minTimes[j][m];
                               updateTime(i, eatCount, time);
                           }
                        }
                    }
                }
            }

            time = -1;
            for (i = k; i <= allCount; i++){
                //if ((minTimes[0][i] != 0 || i <= n) && (time == -1 || minTimes[0][i] < time))
                if (minTimes[0][i] != MAX_TIME && (time == -1 || minTimes[0][i] < time))
                    time = minTimes[0][i];
            }
            return time;
        }

        private void updateTime(int row, int col, int value){
            if (minTimes[row][col] == MAX_TIME || value < minTimes[row][col])
                minTimes[row][col] = value;
        }

        public void print() {
            System.out.println("# R C 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0");
            System.out.println("-----+-----------------------------------------");
            /*for (int j = 0; j <= n; j++){
                 System.out.print(boxes[j].count);
                 System.out.print(' ');
            }
            System.out.println("\n______________________________________________");*/
            for (int i = 0; i <= n; i++){
                System.out.print(boxes[i].pos);System.out.print(' ');
                System.out.print(boxes[i].count);System.out.print(' ');
                System.out.print(boxes[i].color);System.out.print(' ');
                for (int j = 0; j <= allCount; j++){
                    if (/*minTimes[i][j]==0 || */minTimes[i][j]==MAX_TIME)
                        System.out.print(' ');
                    else
                        System.out.print(minTimes[i][j]);
                    System.out.print(' ');
                }
                System.out.println(' ');
            }
        }
    }

    static class Box implements Comparable<Box>{
        int pos;
        int count;
        char color;

        public Box(int pos, int count, char color) {
            this.pos = pos;
            this.count = count;
            this.color = color;
        }

        boolean canMoveTo(Box other){
            return count < other.count && color != other.color;
        }

        @Override
        public int compareTo(Box o) {
            return this.count - o.count;
        }
    }
}

import java.util.Arrays;
import java.util.Scanner;

public class R0_task_C2 {
    static int n,s,k;
    static int allCount = 0;
    static int[]r;
    static char[]c;

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        n = in.nextInt();
        s = in.nextInt();
        k = in.nextInt();

        r = new int[n+1];
        r[0] = 0;
        for (int i = 1; i <= n; i++){
          r[i] = in.nextInt();
          allCount += r[i];
        }

        c = new char[n+1];
        String st = "*" + in.next();
        c = st.toCharArray();
        //-------------

        if (r[s] >= k)
            System.out.println(0);
        else{
            //long t0 = System.currentTimeMillis();

            TimeCalculator tc = new TimeCalculator();
            int time = tc.calc();
            //tc.print();

            System.out.println(time);
        }
    }

    static class TimeCalculator {
        int[][] minTimes;
        static Box[] boxes;

        public TimeCalculator() {
            minTimes = new int [n + 1][allCount + 1];

            boxes = new Box[n+1];
            for (int i=0; i<=n; i++)
                boxes[i] = new Box(i, r[i], c[i]);

            Arrays.sort(boxes);
            boxes[0].pos = s;
        }

        int calc(){
            int i,j;
            int time, eatCount;

            for (i = n; i >= 0; i--){
                for (j = i+1; j <= n; j++){

                    if (i == 0 || boxes[i].canMoveTo(boxes[j])){
                        minTimes[i][j] = Math.abs(boxes[i].pos - boxes[j].pos);

                        for (int m = j+1; m <= allCount; m++){
                           if (minTimes[j][m] > 0) {
                               eatCount = boxes[j].count + (m <= n ? boxes[m].count : m);
                               time = minTimes[i][j] + minTimes[j][m];
                               updateTime(i, eatCount, time);
                           }
                        }
                    }
                }
            }

            time = -1;
            for (i = k; i <= allCount; i++){
                if ((minTimes[0][i] != 0 || i <= n) && (time == -1 || minTimes[0][i] < time))
                    time = minTimes[0][i];
            }
            return time;
        }

        private void updateTime(int row, int col, int value){
            if (minTimes[row][col] == 0 || value < minTimes[row][col])
                minTimes[row][col] = value;
        }

        public void print() {
            System.out.println("0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0");
            System.out.println("-----------------------------------------");
            for (int j = 0; j <= n; j++){
                 System.out.print(r[boxes[j].pos]);
                 System.out.print(' ');
            }
            System.out.println("\n_________________________________________");
            for (int i = 0; i <= n; i++){
                for (int j = 0; j <= allCount; j++){
                    if (minTimes[i][j]==0)
                        System.out.print(' ');
                    else
                        System.out.print(minTimes[i][j]);
                    System.out.print(' ');
                }
                System.out.println(' ');
            }
        }
    }

    static class Box implements Comparable<Box>{
        int pos;
        int count;
        char color;

        public Box(int pos, int count, char color) {
            this.pos = pos;
            this.count = count;
            this.color = color;
        }

        boolean canMoveTo(Box other){
            return count < other.count && color != other.color;
        }

        @Override
        public int compareTo(Box o) {
            return this.count - o.count;
        }
    }
}