#include <bits/stdc++.h>
using namespace std;
long long n, m, l, e, v, q;
set<long long> alp, aep, alm, aem;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  alp.insert(999999999);
  alm.insert(999999999);
  aep.insert(999999999);
  aem.insert(999999999);
  cin >> n >> m >> l >> e >> v;
  for (int i = 0; i < l; i++) {
    long long h;
    cin >> h;
    aep.insert(h);
    aem.insert(-h);
  }
  for (int i = 0; i < e; i++) {
    long long h;
    cin >> h;
    alp.insert(h);
    alm.insert(-h);
  }
  cin >> q;
  for (int i = 0; i < q; i++) {
    long long x1, y1, x2, y2;
    cin >> y1 >> x1 >> y2 >> x2;
    if (y1 == y2) {
      cout << abs(x1 - x2) << "\n";
      continue;
    }
    if (x1 > x2) {
      swap(x1, x2);
    }
    auto lifl = alp.lower_bound(x1);
    auto lifr = alm.lower_bound(-x2);
    auto stupl = aep.lower_bound(x1);
    auto stupr = aem.lower_bound(-x2);
    long long first = min(abs(*lifl - x1) + abs(*lifl - x2),
                          abs(abs(*lifr) - x1) + abs(abs(*lifr) - x2));
    long long sec = min(abs(*stupl - x1) + abs(*stupl - x2),
                        abs(abs(*stupr) - x1) + abs(abs(*stupr) - x2));
    long long ans1 = abs(y1 - y2) / v;
    if (abs(y1 - y2) % v != 0) ans1++;
    long long ans2 = abs(y1 - y2);
    cout << min(ans1 + first, ans2 + sec) << "\n";
  }
  return 0;
}
