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;
long long n, m, i = 0, j = 0, pe[100005], ps[100005], v, ne, ns, cnt1, cnt2,
                indx1, indx2, q;
long long bsearch1(long long x, long long y) {
  long long a = min(x, y);
  long long b = max(x, y);
  long long l = 0;
  long long r = ns - 1;
  long long m;
  while (l < r - 1) {
    m = (l + r) / 2;
    if (ps[m] >= a && ps[m] <= b) {
      r = m;
    } else if (ps[m] < a) {
      l = m;
    } else if (ps[m] > b) {
      r = m;
    }
  }
  if (ps[l] >= a && ps[l] <= b)
    return ps[l];
  else if (ps[r] >= a && ps[r] <= b)
    return ps[r];
  else {
    if (abs(ps[l] - a) <= abs(ps[r] - b))
      return ps[l];
    else
      return ps[r];
  }
}
long long bsearch2(long long x, long long y) {
  long long a = min(x, y);
  long long b = max(x, y);
  long long l = 0;
  long long r = ne - 1;
  long long m;
  while (l < r - 1) {
    m = (l + r) / 2;
    if (pe[m] >= a && pe[m] <= b) {
      r = m;
    } else if (pe[m] < a) {
      l = m;
    } else if (pe[m] > b) {
      r = m;
    }
  }
  if (pe[l] >= a && pe[l] <= b)
    return pe[l];
  else if (pe[r] >= a && pe[r] <= b)
    return pe[r];
  else {
    if (abs(pe[l] - a) <= abs(pe[r] - b))
      return pe[l];
    else
      return pe[r];
  }
}
int main(void) {
  for (cin >> n >> m >> ne >> ns >> v; i < ns; i++) {
    cin >> ps[i];
  }
  for (i = 0; i < ne; i++) {
    cin >> pe[i];
  }
  cin >> q;
  for (j = 0; j < q; j++) {
    long long x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    if (ns != 0) {
      if (ps[ns - 1] >= min(y1, y2))
        indx1 = bsearch1(y1, y2);
      else
        indx1 = ps[ns - 1];
    }
    if (ne != 0) {
      if (pe[ne - 1] >= min(y1, y2))
        indx2 = bsearch2(y1, y2);
      else
        indx2 = pe[ne - 1];
    }
    if (ns != 0)
      cnt1 = abs(x1 - x2) + abs(indx1 - y1) + abs(indx1 - y2);
    else
      cnt1 = LLONG_MAX;
    if (ne != 0)
      cnt2 = ceil(abs(x1 - x2) / (double)v) + abs(indx2 - y1) + abs(indx2 - y2);
    else
      cnt2 = LLONG_MAX;
    cout << min(cnt1, cnt2) << endl;
  }
  return 0;
}
