#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  double v;
  long long e, s;
  cin >> s >> e >> v;
  vector<long long> S, E;
  if (s != 0)
    for (long long i = 0; i < s; i = i + 1) {
      long long t;
      cin >> t;
      S.push_back(t);
    }
  if (e != 0)
    for (long long i = 0; i < e; i = i + 1) {
      long long t;
      cin >> t;
      E.push_back(t);
    }
  sort(E.begin(), E.end());
  sort(S.begin(), S.end());
  long long q;
  cin >> q;
  for (long long i = 0; i < q; i = i + 1) {
    long long x, y, d, k, l, ans = 1e18;
    cin >> y >> x >> l >> k;
    if (k == min(x, k)) {
      d = x;
      x = k;
      k = d;
    }
    if (y == l) {
      cout << (long long)abs(k - x) << " ";
      continue;
    }
    long long t = 0;
    if (S.size() > 0) {
      long long lp =
                    (long long)(lower_bound(S.begin(), S.end(), x) - S.begin()),
                r = (long long)(lower_bound(S.begin(), S.end(), k) - S.begin());
      if (r - lp > 0) {
        t = abs(y - l) + k - x;
        ans = min(t, ans);
      }
      if (lp > 0) {
        t = abs(S[lp - 1] - x) + abs(S[lp - 1] - k) + abs(y - l);
        ans = min(t, ans);
      }
      if (r < S.size()) {
        t = abs(S[r] - x) + abs(S[r] - k) + abs(y - l);
        ans = min(ans, t);
      }
    }
    if (E.size() > 0) {
      long long lp =
                    (long long)(lower_bound(E.begin(), E.end(), x) - E.begin()),
                r = (long long)(lower_bound(E.begin(), E.end(), k) - E.begin());
      if (r - lp > 0) {
        t = (long long)ceil(abs(y - l) / v) + k - x;
        ans = min(t, ans);
      }
      if (l > 0) {
        t = abs(E[lp - 1] - x) + abs(E[lp - 1] - k) +
            (long long)ceil(abs(y - l) / v);
        ans = min(t, ans);
      }
      if (r < E.size()) {
        t = abs(E[r] - x) + abs(E[r] - k) + (long long)ceil(abs(y - l) / v);
        ans = min(ans, t);
      }
    }
    cout << ans << " ";
  }
}
