#include <bits/stdc++.h>
using namespace std;
void read(vector<long long> &v) {
  for (int i = 0; i < v.size(); i++) cin >> v[i];
}
void print(vector<long long> v) {
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
}
long long n, m, a, b, temp;
string str;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, m;
  cin >> n >> m;
  long long s, e;
  cin >> s >> e;
  long long v;
  cin >> v;
  vector<long long> stairs(s);
  read(stairs);
  vector<long long> ele(e);
  read(ele);
  int q;
  cin >> q;
  long long c, d;
  long long ans;
  long long distance;
  while (q--) {
    cin >> a >> b >> c >> d;
    ans = 100000000000000000;
    if (a > c) {
      swap(a, c);
      swap(b, d);
    }
    if (a == c) {
      cout << abs(b - d);
      cout << '\n';
      continue;
    }
    if (b == d) {
      if (ele.size() != 0) {
        auto ne = lower_bound(ele.begin(), ele.end(), b);
        if (ne != ele.end()) {
          distance = *ne - b;
          ans = min(ans, 2 * distance + ((c - a) + (v - 1)) / v);
        }
        if (ne != ele.begin()) {
          ne--;
          distance = b - *ne;
          ans = min(ans, 2 * distance + ((c - a) + (v - 1)) / v);
        }
      }
      if (stairs.size() != 0) {
        auto ns = lower_bound(stairs.begin(), stairs.end(), b);
        if (ns != stairs.end()) {
          distance = *ns - b;
          ans = min(ans, 2 * distance + (c - a));
        }
        if (ns != stairs.begin()) {
          ns--;
          distance = b - *ns;
          ans = min(ans, 2 * distance + c - a);
        }
      }
    } else if (b < d) {
      if (ele.size() != 0) {
        auto ne = lower_bound(ele.begin(), ele.end(), b);
        if (ne != ele.end()) {
          if (*ne <= d)
            ans = min(ans, d - b + ((c - a) + (v - 1)) / v);
          else
            ans = min(ans, d - b + 2 * (*ne - d) + ((c - a) + (v - 1)) / v);
        }
        if (ne != ele.begin()) {
          ne--;
          ans = min(ans, d - b + 2 * (b - *ne) + ((c - a) + (v - 1)) / v);
        }
      }
      if (stairs.size() != 0) {
        auto ns = lower_bound(stairs.begin(), stairs.end(), b);
        if (ns != stairs.end()) {
          if (*ns <= d)
            ans = min(ans, d - b + (c - a));
          else
            ans = min(ans, d - b + 2 * (*ns - d) + (c - a));
        }
        if (ns != stairs.begin()) {
          ns--;
          ans = min(ans, d - b + 2 * (b - *ns) + c - a);
        }
      }
    } else {
      if (ele.size() != 0) {
        auto ne = lower_bound(ele.begin(), ele.end(), b);
        if (ne != ele.end()) {
          ans = min(ans, b - d + 2 * (*ne - b) + ((c - a) + v - 1) / v);
        }
        if (ne != ele.begin()) {
          ne--;
          if (*ne >= d)
            ans = min(ans, b - d + ((c - a) + v - 1) / v);
          else
            ans = min(ans, b - d + ((c - a) + v - 1) / v + 2 * (d - *ne));
        }
      }
      if (stairs.size() != 0) {
        auto ns = lower_bound(stairs.begin(), stairs.end(), b);
        if (ns != stairs.end()) {
          ans = min(ans, b - d + 2 * (*ns - b) + (c - a));
        }
        if (ns != stairs.begin()) {
          ns--;
          if (*ns >= d)
            ans = min(ans, b - d + c - a);
          else
            ans = min(ans, b - d + c - a + 2 * (d - *ns));
        }
      }
    }
    cout << ans;
    cout << '\n';
  }
}
