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;
double const eps = 1e-8;
using ll = long long;
using ii = pair<int, int>;
int n, m, cl, ce, v, q;
int min_ce, max_ce, min_cl, max_cl;
int l[100020];
int e[100020];
int find_closest_stairs(int x) {
  int lo = -1;
  int hi = cl;
  int mi = (hi + lo) / 2;
  if (hi == 0) return -1;
  while (hi - lo > 1) {
    mi = (hi + lo) / 2;
    if (l[mi] < x) {
      lo = mi;
    } else {
      hi = mi;
    }
  }
  return l[mi];
}
int find_closest_elevator(int x) {
  int lo = -1;
  int hi = ce;
  int mi = (hi + lo) / 2;
  if (hi == 0) return -1;
  while (hi - lo > 1) {
    mi = (hi + lo) / 2;
    if (e[mi] < x) {
      lo = mi;
    } else {
      hi = mi;
    }
  }
  return e[mi];
}
int solve(int xi, int yi, int xf, int yf) {
  if (xi == xf) {
    return abs(yi - yf);
  } else {
    int closest_elevator = find_closest_elevator(yi);
    int closest_stairs = find_closest_stairs(yi);
    int q1 = 0xffffe, q2 = 0xffffe;
    if (closest_stairs != -1)
      q1 = abs(xf - xi) + abs(closest_stairs - yi) + abs(closest_stairs - yf);
    if (closest_elevator != -1) {
      q2 = ceil((double)abs(xf - xi) / v) + abs(closest_elevator - yi) +
           abs(closest_elevator - yf);
    }
    return min(q1, q2);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m >> cl >> ce >> v;
  min_ce = 0xffffe;
  max_ce = -0xffffe;
  min_cl = 0xffffe;
  max_cl = -0xffffe;
  for (int i = 0; i < cl; ++i) {
    cin >> l[i];
    max_cl = max(max_cl, l[i]);
    min_cl = min(min_cl, l[i]);
  }
  for (int i = 0; i < ce; ++i) {
    cin >> e[i];
    max_ce = max(max_ce, e[i]);
    min_ce = min(min_ce, e[i]);
  }
  cin >> q;
  int xi, yi, xf, yf;
  for (int i = 0; i < q; ++i) {
    cin >> xi >> yi >> xf >> yf;
    cout << solve(xi, yi, xf, yf) << endl;
  }
  return 0;
}
