#include <bits/stdc++.h>
long long mod = 1e9 + 7;
inline long long pwr(long long base, long long n) {
  long long ans = 1;
  while (n > 0) {
    if (n % 2 == 1) ans = ans * base;
    base = base * base;
    n /= 2;
  }
  return ans;
}
struct range {
  int l, h;
};
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n, m, st, el, v;
  cin >> n >> m >> st >> el >> v;
  vector<long long int> stairsf, stairsb;
  for (int i = 0; i < st; i++) {
    long long int first;
    cin >> first;
    stairsf.push_back(first);
    stairsb.push_back(-first);
  }
  sort(stairsb.begin(), stairsb.end());
  vector<long long int> elevatorsf, elevatorsb;
  for (int i = 0; i < el; i++) {
    long long int first;
    cin >> first;
    elevatorsf.push_back(first);
    elevatorsb.push_back(-first);
  }
  sort(elevatorsb.begin(), elevatorsb.end());
  int q;
  cin >> q;
  while (q--) {
    long long int t1 = 0, t2 = 0, t3 = 0, t4 = 0;
    int x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    if (x1 == x2) {
      cout << abs(y1 - y2) << "\n";
      continue;
    }
    int getst =
        lower_bound(stairsf.begin(), stairsf.end(), y1) - stairsf.begin();
    if (getst < stairsf.size())
      t1 = (stairsf[getst] - y1) + abs(x2 - x1) + abs(y2 - stairsf[getst]);
    else
      t1 = 1e18;
    getst = lower_bound(stairsb.begin(), stairsb.end(), -y1) - stairsb.begin();
    if (getst < stairsb.size())
      t2 = (y1 - abs(stairsb[getst])) + abs(x2 - x1) +
           abs(y2 - abs(stairsb[getst]));
    else
      t2 = 1e18;
    int getel = lower_bound(elevatorsf.begin(), elevatorsf.end(), y1) -
                elevatorsf.begin();
    if (getel < elevatorsf.size()) {
      t3 = (elevatorsf[getel] - y1) + abs(y2 - elevatorsf[getel]);
      t3 += abs(x2 - x1) / v;
      if (abs(x2 - x1) % v) t3++;
    } else
      t3 = 1e18;
    getel = lower_bound(elevatorsb.begin(), elevatorsb.end(), -y1) -
            elevatorsb.begin();
    if (getel < elevatorsb.size()) {
      t4 = (y1 - abs(elevatorsb[getel])) + abs(y2 - abs(elevatorsb[getel]));
      t4 += abs(x2 - x1) / v;
      if (abs(x2 - x1) % v) t4++;
    } else
      t4 = 1e18;
    cout << min(t1, min(t2, min(t3, t4))) << "\n";
  }
  return 0;
}
