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

from math import ceil


def findCp(l, num):
    low, high = 0, len(l) - 1
    mid = 0
    while low < high - 1:
        mid = (low + high) // 2
        if l[mid] > num:
            high = mid
        else:
            low = mid
    if l[mid] < num and mid + 1 >= len(l):
        return [l[mid], -1]
    if l[mid] < num < l[mid + 1]:
        return [l[mid], l[mid + 1]]
    if l[mid] > num:
        return [-1, l[mid]]
    return [-1, -1]


n, m, cl, ce, v = input().split(' ')
n, m, cl, ce, v = int(n), int(m), int(cl), int(ce), int(v)
cl_list, ce_list = [], []
if cl > 0:
    cl_list = [int(i) for i in input().split(' ')]
else:
    input()
if ce > 0:
    ce_list = [int(i) for i in input().split(' ')]
else:
    input()
cl_list.sort()
ce_list.sort()
query = int(input())
for i in range(0, query):
    x1, y1, x2, y2 = input().split(' ')
    x1, y1, x2, y2 = int(x1), int(y1), int(x2), int(y2)
    len_cl, len_ce = 200000000, 200000000
    if cl > 0:
        closest_left, closest_right = findCp(cl_list, y1)
        # print(closest_left, closest_right)
        if closest_left != -1 and closest_right != -1:
            len_cl = min(abs(y1 - closest_left) + abs(y2 - closest_left) + abs(x1 - x2),
                         abs(y1 - closest_right) + abs(y2 - closest_right) + abs(x1 - x2))
        elif closest_left == closest_right == -1:
            pass
        elif closest_left == -1:
            len_cl = abs(y1 - closest_right) + abs(y2 - closest_right) + abs(x1 - x2)
        else:
            len_cl = abs(y1 - closest_left) + abs(y2 - closest_left) + abs(x1 - x2)
    if ce > 0:
        closest_left, closest_right = findCp(ce_list, y1)
        # print(closest_left, closest_right)
        if closest_left != -1 and closest_right != -1:
            len_ce = min(abs(y1 - closest_left) + abs(y2 - closest_left) + ceil(abs(x1 - x2) / v),
                         abs(y1 - closest_right) + abs(y2 - closest_right) + ceil(abs(x1 - x2) / v))
        elif closest_left == closest_right == -1:
            pass
        elif closest_left == -1:
            len_ce = abs(y1 - closest_right) + abs(y2 - closest_right) + ceil(abs(x1 - x2) / v)
        elif closest_right == -1:
            len_ce = abs(y1 - closest_left) + abs(y2 - closest_left) + ceil(abs(x1 - x2) / v)
    print(min(len_cl, len_ce))
