2 10 1 1 1
1
10
1
1 5 1 8
 4 4 1 0 1
1

1
1 2 1 4
 2 5 1 0 1
2

1
1 4 1 5
 10 10 1 8 4
10
2 3 4 5 6 7 8 9
10
1 1 3 1
2 1 7 1
1 1 9 1
7 1 4 1
10 1 7 1
2 1 7 1
3 1 2 1
5 1 2 1
10 1 5 1
6 1 9 1
 2 4 1 1 1
1
4
1
1 2 1 3
 2 2 0 1 1

1
1
1 2 2 2
 1000 1000 1 1 10
1
2
1
1 900 1 1000
 5 5 1 1 1
3
2
1
1 5 1 1
 2 4 1 1 1
1
2
1
2 3 2 4
 4 4 1 0 1
4

5
1 1 2 2
1 3 2 2
3 3 4 3
3 2 2 2
1 2 2 3

3
 2
 1
 3
4
4
3
3
4
3
3
4
3
 1
 3
 100
 4
 1
 6
4
3
5
4

def bin_search(m,ref):
    l = -1
    r = len(m)
    while(r - l > 1):
        if m[(r+l)//2] > ref:
            r = (r+l)//2
        else:
            l = (r+l)//2
    return((r+l)//2)
n,m,cl,ce,v = map(int,input().split())
stairs = []
for i in range(cl):
    stairs.append(int(input()))
elevators = []
for i in range(cl):
    elevators.append(int(input()))
q = int(input())
for i in range(q):
    coordinates = list(map(int,input().split()))
    if coordinates[1] == coordinates[3]:
        print(abs(coordinates[0]-coordinates[2]))
    else:
        a = 0
        b = 0
        istair = bin_search(stairs,(coordinates[0]+coordinates[2])//2)
        ielevator = bin_search(elevators,(coordinates[0]+coordinates[2])//2)
        a = abs(istair-coordinates[0]) + abs(istair-coordinates[2]) + abs(coordinates[1]-coordinates[3])
        b = abs(ielevator-coordinates[0]) + abs(ielevator-coordinates[2]) + abs(coordinates[1]-coordinates[3])//v
        if a < b:
            print(a-2)
        else:
            print(b-2)