#include <bits/stdc++.h>
using namespace std;
int n, m, l, e, v, q;
vector<int> v1;
vector<int> v2;
int main() {
  cin >> n >> m >> l >> e >> v;
  for (int i = 1; i <= l; i++) {
    int a;
    cin >> a;
    v2.push_back(a);
  }
  for (int i = 1; i <= e; i++) {
    int a;
    cin >> a;
    v1.push_back(a);
  }
  cin >> q;
  for (int i = 1; i <= q; i++) {
    int x, y, x2, y2;
    cin >> x >> y >> x2 >> y2;
    auto it = lower_bound(v1.begin(), v1.end(), y);
    auto it2 = lower_bound(v2.begin(), v2.end(), y);
    int l = 0, r = 0, l2 = 0, r2 = 0;
    if (it != v1.end()) {
      r = *it;
    }
    if (it != v1.begin()) {
      it--;
      l = *it;
    }
    if (it2 != v2.end()) {
      r2 = *it2;
    }
    if (it2 != v2.begin()) {
      it2--;
      l2 = *it2;
    }
    long long sum = 1e9, sum2 = 1e9, sum3 = 1e9, sum4 = 1e9;
    if (r) {
      sum =
          abs(y - r) + (abs(x - x2) / v + (abs(x - x2) % v != 0)) + abs(y2 - r);
    }
    if (l) {
      sum2 =
          abs(y - l) + (abs(x - x2) / v + (abs(x - x2) % v != 0)) + abs(y2 - l);
    }
    if (r2) {
      sum3 = abs(y - r2) + abs(x - x2) + abs(y2 - r2);
    }
    if (l2) {
      sum4 = abs(y - l2) + abs(x - x2) + abs(y2 - l2);
    }
    cout << min(min(sum, min(sum2, min(sum3, sum4))),
                (x == x2 ? abs(y - y2) : (long long)1e9))
         << '\n';
  }
}
