#include <bits/stdc++.h>
using namespace std;
int N, M, Cl, Ce, V, Q;
vector<int> L, E;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> N >> M >> Cl >> Ce >> V;
  int Ci;
  for (int i = 1; i <= Cl; i++) {
    cin >> Ci;
    L.push_back(Ci);
  }
  for (int i = 1; i <= Ce; i++) {
    cin >> Ci;
    E.push_back(Ci);
  }
  cin >> Q;
  int X1, Y1, X2, Y2;
  while (Q--) {
    cin >> X1 >> Y1 >> X2 >> Y2;
    if (Y1 > Y2) swap(Y1, Y2);
    int Ans = 1e9;
    int Dx = abs(X1 - X2), Dy = abs(Y1 - Y2);
    if (Dx == 0) {
      cout << Dy << '\n';
      continue;
    }
    auto it = lower_bound(E.begin(), E.end(), Y1);
    if (it != E.end() && *it <= Y2) {
      Ans = (Dx + V - 1) / V + Dy;
    }
    it = lower_bound(L.begin(), L.end(), Y1);
    if (it != L.end() && *it <= Y2) {
      Ans = min(Ans, Dx + Dy);
    }
    it = lower_bound(E.begin(), E.end(), Y1);
    if (Ce && it != E.begin()) {
      it--;
      Ans = min(Ans, (Y1 - *it) * 2 + Dy + (Dx + V - 1) / V);
    }
    it = upper_bound(E.begin(), E.end(), Y2);
    if (it != E.end()) {
      Ans = min(Ans, (*it - Y2) * 2 + Dy + (Dx + V - 1) / V);
    }
    it = lower_bound(L.begin(), L.end(), Y1);
    if (Cl && it != L.begin()) {
      it--;
      Ans = min(Ans, (Y1 - *it) * 2 + Dy + Dx);
    }
    it = upper_bound(L.begin(), L.end(), Y2);
    if (it != L.end()) {
      Ans = min(Ans, (*it - Y2) * 2 + Dy + Dx);
    }
    cout << Ans << '\n';
  }
  return 0;
}
