#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, v, nd, nl;
  cin >> n >> m >> nd >> nl >> v;
  long long l[nl], d[nd];
  for (int i = 0; i < nd; i++) {
    cin >> d[i];
    d[i]--;
  }
  for (int i = 0; i < nl; i++) {
    cin >> l[i];
    l[i]--;
  }
  sort(d, d + nd);
  sort(l, l + nl);
  int t;
  cin >> t;
  while (t--) {
    long long x1, x2, y1, y2, res1 = INT_MAX, res2 = INT_MAX, res3 = INT_MAX,
                              res4 = INT_MAX, ks, k;
    cin >> y1 >> x1 >> y2 >> x2;
    x1--;
    y1--;
    x2--;
    y2--;
    if (y1 == y2) {
      cout << abs(x1 - x2) << '\n';
      continue;
    }
    if (nl) {
      k = lower_bound(l, l + nl, x1) - l;
      ks = k;
      if (k == nl) k--;
      if (ks == nl || !(k == 0 && l[k] != x1)) {
        if (l[k] != x1 && ks != nl) k--;
        res1 = x1 - l[k] + abs(l[k] - x2) + abs(y1 - y2) / v +
               min(1LL, abs(y1 - y2) % v);
      } else
        res1 = INT_MAX;
      k = upper_bound(l, l + nl, x1) - l;
      if (k != nl) {
        res2 = -x1 + l[k] + abs(l[k] - x2) + abs(y1 - y2) / v +
               min(1LL, abs(y1 - y2) % v);
      } else
        res2 = INT_MAX;
    }
    if (nd) {
      k = lower_bound(d, d + nd, x1) - d;
      ks = k;
      if (k == nd) k--;
      if (ks == nd || !(k == 0 && d[k] != x1)) {
        if (d[k] != x1 && ks != nd) k--;
        res3 = x1 - d[k] + abs(d[k] - x2) + abs(y1 - y2);
      } else
        res3 = INT_MAX;
      k = upper_bound(d, d + nd, x1) - d;
      if (k != nd) {
        res4 = -x1 + d[k] + abs(d[k] - x2) + abs(y1 - y2);
      } else
        res4 = INT_MAX;
    }
    cout << min({res1, res2, res3, res4}) << '\n';
  }
  return 0;
}
