def intm(string): return int(string) - 1 # return minimum time to N def goforward(start, curcost, curtime): if start == N - 1: return curtime smallest = 1e+10 for i in range(V): if S[i] == start: nexcost = curcost + Y[i] nextime = curtime + M[i] if nexcost > C:continue result = goforward(T[i], nexcost, nextime) #print("{} -> {} :{}".format(start, T[i], result)) smallest = min(smallest, result) return smallest N = int(input()) C = int(input()) V = int(input()) S = list(map(intm, input().split(" "))) T = list(map(intm, input().split(" "))) Y = list(map(int, input().split(" "))) M = list(map(int, input().split(" "))) result = goforward(0, 0, 0) if result >= 1e+9: result = -1 print(result)