#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, m, cl, ce, v;
  cin >> n >> m >> cl >> ce >> v;
  vector<long long> stairs(cl);
  vector<long long> ele(ce);
  long long i;
  for (i = 0; i < cl; i++) cin >> stairs[i];
  for (i = 0; i < ce; i++) cin >> ele[i];
  sort(stairs.begin(), stairs.end());
  sort(ele.begin(), ele.end());
  long long q;
  cin >> q;
  while (q--) {
    long long x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    if (y1 > y2) swap(y1, y2);
    if (x1 == x2) {
      cout << (y2 - y1) << "\n";
      continue;
    }
    long long ans = 1e12;
    auto e1 = upper_bound(ele.begin(), ele.end(), y2);
    if (e1 != ele.begin()) {
      e1 = prev(e1);
      long long x = *e1;
      if (x >= y1 && x <= y2) {
        ans = min(ans, (long long)ceil(abs(x2 - x1) / double(v)) + (y2 - y1));
      } else {
        ans = min(ans, (long long)ceil(abs(x2 - x1) / double(v)) + (y1 - x) +
                           (y2 - x));
      }
    }
    auto e2 = lower_bound(ele.begin(), ele.end(), y1);
    if (e2 != ele.end()) {
      long long x = *e2;
      if (x >= y1 && x <= y2) {
        ans = min(ans, (long long)ceil(abs(x2 - x1) / double(v)) + (y2 - y1));
      } else {
        ans = min(ans, (long long)ceil(abs(x2 - x1) / double(v)) + (x - y1) +
                           (x - y2));
      }
    }
    auto s1 = upper_bound(stairs.begin(), stairs.end(), y2);
    if (s1 != stairs.begin()) {
      s1 = prev(s1);
      long long x = *s1;
      if (x >= y1 && x <= y2) {
        ans = min(ans, abs(x2 - x1) + (y2 - y1));
      } else {
        ans = min(ans, abs(x2 - x1) + (y1 - x) + (y2 - x));
      }
    }
    auto s2 = lower_bound(stairs.begin(), stairs.end(), y1);
    if (s2 != stairs.end()) {
      long long x = *s2;
      if (x >= y1 && x <= y2) {
        ans = min(ans, abs(x2 - x1) + (y2 - y1));
      } else {
        ans = min(ans, abs(x2 - x1) + (x - y1) + (x - y2));
      }
    }
    cout << ans << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
