def search(num, money, routes, nowTime): minTime = 1001 time = 2000 for i in xrange(0,routes): if (t[i] == num) & (y[i] <= money): if s[i] == 1: time = m[i] else: time = search(s[i], money - y[i], routes, nowTime+m[i]) if time < minTime: minTime = time return minTime+nowTime n = input() c = input() v = input() s = map(int, raw_input().split()) t = map(int, raw_input().split()) y = map(int, raw_input().split()) m = map(int, raw_input().split()) result = search(n,c,v,0) if result == 1001: result = -1 print result