#include <bits/stdc++.h>
using namespace std;
vector<long long> s, e;
long long v;
long long calc(pair<long long, long long> x, pair<long long, long long> y) {
  long long ans = 1e15;
  auto its = lower_bound(s.begin(), s.end(), x.first);
  long long dy = abs(x.second - y.second);
  if (x.second == y.second) return y.first - x.first;
  if (its != s.end()) {
    ans = min(ans, abs(*its - x.first) + dy + abs(*its - y.first));
  }
  if (its != s.begin()) {
    its = prev(its, 1);
    ans = min(ans, abs(*its - x.first) + dy + abs(*its - y.first));
  }
  auto ite = lower_bound(e.begin(), e.end(), x.first);
  if (ite != e.end()) {
    ans =
        min(ans, abs(*ite - x.first) + (dy + v - 1) / v + abs(*ite - y.first));
  }
  if (ite != e.begin()) {
    ite = prev(ite, 1);
    ans =
        min(ans, abs(*ite - x.first) + (dy + v - 1) / v + abs(*ite - y.first));
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long n, m, c1, c2;
  cin >> n >> m >> c1 >> c2 >> v;
  long long k;
  for (long long i = 0; i < c1; i++) {
    cin >> k;
    s.push_back(k);
  }
  for (long long i = 0; i < c2; i++) {
    cin >> k;
    e.push_back(k);
  }
  long long q;
  cin >> q;
  while (q--) {
    pair<long long, long long> x, y;
    cin >> x.second >> x.first >> y.second >> y.first;
    if (x.first > y.first) swap(x, y);
    cout << calc(x, y) << '\n';
  }
  return 0;
}
