n = int(input()) c = int(input()) v = int(input()) s = list(map(int, input().split())) t = list(map(int, input().split())) y = list(map(int, input().split())) m = list(map(int, input().split())) adjacent_list = [[] for i in range(n+1)] for i in range(v): adjacent_list[s[i]].append([t[i],y[i],m[i]]) dp = [[10**9 for i in range(c+1)] for j in range(n+1)] #dp[i][j] := i番目の街に行き、j円使った時の最短時間 dp[0][0] = 0 dp[1][0] = 0 for i in range(1,n+1): for j in range(c+1): if dp[i][j] != 10**9: for next_node,cost, time in adjacent_list[i]: dp[next_node][j+cost] = min(dp[next_node][j+cost], dp[i][j] + time) ans = 10**9 for i in range(c+1): ans = min(ans, dp[-1][i]) if ans == 10**9: print(-1) else: print(ans)