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 main() {
  long long int a, b, c, d, e, i, j, k, l, n, m, x, y, z, SS, EE, v, q, x1, y1,
      x2, y2;
  scanf("%lld%lld%lld%lld%lld", &n, &m, &SS, &EE, &v);
  vector<long long int> E(EE), S(SS);
  vector<long long int>::iterator it;
  for (i = 0; i < SS; i++) {
    scanf("%lld", &S[i]);
  }
  for (i = 0; i < EE; i++) {
    scanf("%lld", &E[i]);
  }
  scanf("%lld", &q);
  for (i = 0; i < q; i++) {
    scanf("%lld%lld%lld%lld", &x1, &y1, &x2, &y2);
    if (EE > 0) {
      it = upper_bound(E.begin(), E.end(), y1);
      a = it - E.begin();
      x = 0;
      if (a == 0) {
        c = E[a];
        a = abs(E[a] - y1);
      } else if (a < EE) {
        j = abs(E[a - 1] - y1);
        d = E[a - 1];
        k = abs(y1 - E[a]);
        e = E[a];
        if (j <= k) {
          c = d;
          a = j;
        } else {
          c = e;
          a = k;
        }
      } else {
        c = E[a - 1];
        a = abs(y1 - E[a - 1]);
      }
      x = x + a;
      x = x + abs(y2 - c);
      a = abs(x1 - x2);
      if (a % v == 0) {
        x = x + (a / v);
      } else {
        x = x + (a / v) + 1;
      }
    } else {
      x = 1000000000000000000;
    }
    if (SS > 0) {
      z = 0;
      it = upper_bound(S.begin(), S.end(), y1);
      b = it - S.begin();
      if (S[b] == 0) {
        c = S[b];
        a = abs(S[b] - y1);
      } else if (b < SS) {
        j = abs(S[b - 1] - y1);
        d = S[b - 1];
        k = abs(S[b] - y1);
        e = S[b];
        if (j <= k) {
          a = j;
          c = d;
        } else {
          a = k;
          c = e;
        }
      } else {
        a = abs(y1 - S[b - 1]);
        c = S[b - 1];
      }
      z = z + a;
      z = z + abs(x1 - x2) + abs(y2 - c);
    } else {
      z = 1000000000000000000;
    }
    x = min(x, z);
    printf("%lld\n", x);
  }
  return 0;
}
