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

#include <bits/stdc++.h>
using namespace std;
int n, m, l, e, v, q;
vector<int> stairs, elevators;
int nearest_stairs(int idx, bool r) {
  int lo = 0, hi = stairs.size() - 1, mid;
  while (lo < hi) {
    mid = lo + (hi - lo) / 2;
    if (idx <= stairs[mid])
      hi = mid;
    else
      lo = mid + 1;
  }
  int lo2 = 0;
  hi = stairs.size() - 1;
  while (lo2 < hi) {
    mid = lo2 + (hi - lo2 + 1) / 2;
    if (idx >= stairs[mid])
      lo2 = mid;
    else
      hi = mid - 1;
  }
  if (r) return stairs[lo];
  return stairs[lo2];
}
int nearest_elevator(int idx, bool r) {
  int lo = 0, hi = elevators.size() - 1, mid;
  while (lo < hi) {
    mid = lo + (hi - lo) / 2;
    if (idx <= elevators[mid])
      hi = mid;
    else
      lo = mid + 1;
  }
  int lo2 = 0;
  hi = elevators.size() - 1;
  while (lo2 < hi) {
    mid = lo2 + (hi - lo2 + 1) / 2;
    if (idx >= elevators[mid])
      lo2 = mid;
    else
      hi = mid - 1;
  }
  if (r) {
    return elevators[lo];
  }
  return elevators[lo2];
}
int main() {
  scanf("%d%d%d%d%d", &n, &m, &l, &e, &v);
  for (int i = 0; i < l; i++) {
    int x;
    scanf("%d", &x);
    stairs.push_back(x);
  }
  for (int i = 0; i < e; i++) {
    int x;
    scanf("%d", &x);
    elevators.push_back(x);
  }
  sort(stairs.begin(), stairs.end());
  sort(elevators.begin(), elevators.end());
  scanf("%d", &q);
  while (q--) {
    int x1, x2, y1, y2;
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    long long E = 1e18;
    int N, N2 = 0;
    if (x1 == x2) {
      printf("%d\n", abs(y1 - y2));
      continue;
    }
    if (e) {
      N = nearest_elevator(y1, 1);
      N2 = nearest_elevator(y1, 0);
      E = min(abs(y1 - N) + (abs(x2 - x1) + v - 1) / v + abs(N - y2),
              abs(y1 - N2) + (abs(x2 - x1) + v - 1) / v + abs(N2 - y2));
    }
    long long S = 1e18;
    if (l) {
      N = nearest_stairs(y1, 1);
      N2 = nearest_stairs(y1, 0);
      S = min(abs(y1 - N) + abs(x2 - x1) + abs(N - y2),
              abs(y1 - N2) + abs(x2 - x1) + abs(N2 - y2));
    }
    printf("%lld\n", min(S, E));
  }
  return 0;
}
