#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 113;
const long long INF = 1e17;
struct pt {
  int x, y;
  pt(int x = 0, int y = 0) : x(x), y(y) {}
};
int n, m, ln, sn, v;
vector<int> lifts, stairs;
long long count_stair(int sy, pt a, pt b) {
  if (sy == -1) {
    return INF;
  }
  long long ans = abs(a.y - sy);
  ans += abs(a.x - b.x);
  ans += abs(b.y - sy);
  return ans;
}
long long count_lift(int ly, pt a, pt b) {
  if (ly == -1) {
    return INF;
  }
  long long ans = abs(a.y - ly);
  ans += (abs(a.x - b.x) + v - 1) / v;
  ans += abs(b.y - ly);
  return ans;
}
int find_after(vector<int>& vec, int y) {
  auto lit = upper_bound(vec.begin(), vec.end(), y);
  if (lit == vec.end()) {
    return -1;
  }
  return *lit;
}
int find_before(vector<int>& vec, int y) {
  auto lit = upper_bound(vec.begin(), vec.end(), y);
  if (lit == vec.begin()) {
    return -1;
  }
  --lit;
  return *lit;
}
int main() {
  cin >> n >> m >> ln >> sn >> v;
  for (int i = 0; i < ln; ++i) {
    int ind;
    cin >> ind;
    stairs.push_back(ind);
  }
  for (int i = 0; i < sn; ++i) {
    int ind;
    cin >> ind;
    lifts.push_back(ind);
  }
  int q;
  cin >> q;
  for (int t = 0; t < q; ++t) {
    pt a, b;
    cin >> a.x >> a.y >> b.x >> b.y;
    if (a.y > b.y) {
      swap(a, b);
    }
    if (a.x == b.x) {
      cout << abs(a.y - b.y) << endl;
      continue;
    }
    long long ans = count_stair(find_after(stairs, a.y), a, b);
    ans = min(ans, count_stair(find_after(stairs, b.y), a, b));
    ans = min(ans, count_stair(find_before(stairs, a.y), a, b));
    ans = min(ans, count_stair(find_before(stairs, b.y), a, b));
    ans = min(ans, count_lift(find_after(lifts, a.y), a, b));
    ans = min(ans, count_lift(find_after(lifts, b.y), a, b));
    ans = min(ans, count_lift(find_before(lifts, a.y), a, b));
    ans = min(ans, count_lift(find_before(lifts, b.y), a, b));
    cout << ans << endl;
  }
}
