from heapq import heapify, heappush as hpush, heappop as hpop N, C, V = int(input()), int(input()), int(input()) S = [int(a)-1 for a in input().split()] T = [int(a)-1 for a in input().split()] Y = [int(a) for a in input().split()] M = [int(a) for a in input().split()] X = [[] for _ in range(N * (C + 1))] # i * N + j: i 円使って頂点jにいる状態 for s, t, y, m in zip(S, T, Y, M): for i in range(y, C + 1): X[(i-y)*N+s].append((i*N+t, m)) def dijkstra(n, E, i0=0): kk = 18 mm = (1 << kk) - 1 h = [i0] D = [1 << 30] * n done = [0] * n D[i0] = 0 while h: x = hpop(h) d, i = x >> kk, x & mm done[i] = 1 for j, w in E[i]: nd = d + w if D[j] < 0 or D[j] > nd: if done[j] == 0: hpush(h, (nd << kk) + j) D[j] = nd return (min(D[N-1::N]) + 1) % (2 ** 30 + 1) - 1 print(dijkstra(N * (C + 1), X))