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;
const long long MOD = (long long)1e18 + 7;
const int inf = (int)1e9 + 9;
const double eps = 1e-7;
const int sz = 300;
const double pi = 3.14159265359;
long long n, m, cl, ce, v, q, xs, ys, xf, yf;
long long l[1000000], e[100000];
int main() {
  scanf("%lld%lld%lld%lld%lld", &n, &m, &cl, &ce, &v);
  for (int i = 0; i < cl; ++i) scanf("%lld", &l[i]);
  for (int i = 0; i < ce; ++i) scanf("%lld", &e[i]);
  scanf("%lld", &q);
  long long lift, stairs, dist1, dist2;
  long long h1, h2, fast;
  for (int i = 0; i < q; ++i) {
    scanf("%lld%lld%lld%lld", &xs, &ys, &xf, &yf);
    if (xs == xf) {
      printf("%lld\n", abs(ys - yf));
      continue;
    }
    if (ce == 0)
      h1 = MOD;
    else {
      lift = lower_bound(e, e + ce, ys) - e;
      if (lift == 0)
        fast = lift;
      else if (lift == ce)
        fast = lift - 1;
      else {
        dist1 = abs(ys - e[lift]) + abs(yf - e[lift]);
        dist2 = abs(ys - e[lift - 1]) + abs(yf - e[lift - 1]);
        if (dist2 < dist1)
          fast = lift - 1;
        else
          fast = lift;
      }
      h1 = abs(ys - e[fast]) + abs(yf - e[fast]) + abs(xs - xf) / v +
           bool(abs(xs - xf) % v);
    }
    if (cl == 0)
      h2 = MOD;
    else {
      stairs = lower_bound(l, l + cl, ys) - l;
      if (stairs == 0)
        fast = stairs;
      else if (stairs == cl)
        fast = stairs - 1;
      else {
        dist1 = abs(ys - l[stairs]) + abs(yf - l[stairs]);
        dist2 = abs(ys - l[stairs - 1]) + abs(yf - l[stairs - 1]);
        if (dist2 < dist1)
          fast = stairs - 1;
        else
          fast = stairs;
      }
      h2 = abs(ys - l[fast]) + abs(yf - l[fast]) + abs(xs - xf);
    }
    printf("%lld\n", min(h1, h2));
  }
  return 0;
}
