#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;
}
