from collections import * from itertools import * from functools import * from heapq import * import sys,math input = sys.stdin.readline N,M,W = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) C = list(map(int,input().split())) D = list(map(int,input().split())) N += M A += [-i for i in C] B += [-i for i in D] INF = (1<<60) dp = [-INF]*(1<>j)&1: continue else: if is_ok(dp[i]+A[j]): dp[i|(1<