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;
void run() {
  long long n, m;
  cin >> n >> m;
  long long cl, ce, v;
  cin >> cl >> ce >> v;
  vector<long long> stairs(cl);
  for (int i = 0; i < cl; ++i) {
    cin >> stairs[i];
  }
  vector<long long> lift(ce);
  for (int i = 0; i < ce; ++i) {
    cin >> lift[i];
  }
  long long q;
  cin >> q;
  for (int cnt = 0; cnt < q; ++cnt) {
    long long x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    if (x1 == x2) {
      cout << abs(y1 - y2) << endl;
      continue;
    }
    swap(x1, y1);
    swap(x2, y2);
    long long closestlift =
        lower_bound(lift.begin(), lift.end(), x1) - lift.begin();
    if (closestlift != lift.size()) {
      closestlift = lift[closestlift];
    } else {
      closestlift = 1000000000;
    }
    long long closestlift1 =
        lower_bound(lift.begin(), lift.end(), x1) - lift.begin() - 1;
    if (closestlift1 < 0) {
      closestlift1 = 1000000000;
    } else {
      closestlift1 = lift[closestlift1];
    }
    long long dist1 = abs(closestlift - x1) + abs(closestlift - x2) +
                      ceil((double)(abs(y2 - y1)) / (double)v);
    long long dist2 = abs(closestlift1 - x1) + abs(closestlift1 - x2) +
                      ceil((double)(abs(y2 - y1)) / (double)v);
    long long closestlift2 =
        lower_bound(lift.begin(), lift.end(), x2) - lift.begin();
    if (closestlift2 != lift.size()) {
      closestlift2 = lift[closestlift2];
    } else {
      closestlift2 = 1000000000;
    }
    long long closestlift3 =
        lower_bound(lift.begin(), lift.end(), x2) - lift.begin() - 1;
    if (closestlift3 < 0) {
      closestlift3 = 1000000000;
    } else {
      closestlift3 = lift[closestlift3];
    }
    long long dist11 = abs(closestlift2 - x1) + abs(closestlift2 - x2) +
                       ceil((double)(abs(y2 - y1)) / (double)v);
    long long dist22 = abs(closestlift3 - x1) + abs(closestlift3 - x2) +
                       ceil((double)(abs(y2 - y1)) / (double)v);
    long long closeststair =
        lower_bound(stairs.begin(), stairs.end(), x1) - stairs.begin();
    if (closeststair == stairs.size()) {
      closeststair = 1000000000;
    } else {
      closeststair = stairs[closeststair];
    }
    long long closeststair1 =
        lower_bound(stairs.begin(), stairs.end(), x1) - stairs.begin() - 1;
    if (closeststair1 < 0) {
      closeststair1 = 1000000000;
    } else {
      closeststair1 = stairs[closeststair1];
    }
    long long dist3 =
        abs(closeststair - x1) + abs(closeststair - x2) + abs(y2 - y1);
    long long dist4 =
        abs(closeststair1 - x1) + abs(closeststair1 - x2) + abs(y2 - y1);
    long long closeststair2 =
        lower_bound(stairs.begin(), stairs.end(), x2) - stairs.begin();
    if (closeststair2 == stairs.size()) {
      closeststair2 = 1000000000;
    } else {
      closeststair2 = stairs[closeststair2];
    }
    long long closeststair3 =
        lower_bound(stairs.begin(), stairs.end(), x2) - stairs.begin() - 1;
    if (closeststair3 < 0) {
      closeststair3 = 1000000000;
    } else {
      closeststair3 = stairs[closeststair3];
    }
    long long dist33 =
        abs(closeststair2 - x1) + abs(closeststair2 - x2) + abs(y2 - y1);
    long long dist44 =
        abs(closeststair3 - x1) + abs(closeststair3 - x2) + abs(y2 - y1);
    cout << min(min({dist11, dist22, dist33, dist44}),
                min({dist1, dist2, dist3, dist4}))
         << endl;
  }
}
int main() {
  run();
  return 0;
}
