#include <bits/stdc++.h>
using namespace std;
long long int ll_max(long long int a, long long int b, long long int c) {
  return max(a, max(b, c));
}
int int_max(int a, int b, int c) { return max(a, max(b, c)); }
long long int ll_min(long long int a, long long int b, long long int c) {
  return min(a, min(b, c));
}
int int_min(int a, int b, int c) { return min(a, min(b, c)); }
long long int max(int a, long long int b) { return max((long long int)a, b); }
long long int min(int a, long long int b) { return min((long long int)a, b); }
long long int min(long long int a, int b) { return min(a, (long long int)b); }
long long int max(long long int a, int b) { return max(a, (long long int)b); }
long long int dx[] = {0, 0, 1, -1};
long long int dy[] = {1, -1, 0, 0};
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << ' ' << *it << " = " << a;
  err(++it, args...);
}
template <typename T, typename U>
inline void min_self(T& x, U y) {
  if (y < x) x = y;
}
template <typename T, typename U>
inline void max_self(T& x, U y) {
  if (x < y) x = y;
}
template <class T1, class T2>
ostream& operator<<(ostream& out, pair<T1, T2> pair) {
  return out << "(" << pair.first << ", " << pair.second << ")";
}
template <class T>
ostream& operator<<(ostream& out, vector<T> vec) {
  out << "(";
  for (auto& v : vec) out << v << ", ";
  return out << ")";
}
template <class T>
ostream& operator<<(ostream& out, set<T> vec) {
  out << "(";
  for (auto& v : vec) out << v << ", ";
  return out << ")";
}
template <class L, class R>
ostream& operator<<(ostream& out, map<L, R> vec) {
  out << "(";
  for (auto& v : vec) out << "[" << v.first << ", " << v.second << "]";
  return out << ")";
}
template <class A, class B>
istream& operator>>(istream& in, pair<A, B>& a) {
  return in >> a.first >> a.second;
}
template <class A>
istream& operator>>(istream& in, vector<A>& a) {
  for (A& i : a) in >> i;
  return in;
}
void solve() {
  long long int n, m, cl, ce, v;
  cin >> n >> m >> cl >> ce >> v;
  vector<long long int> s(cl);
  if (cl != 0)
    for (long long int i = 0; i < cl; i++) cin >> s[i];
  vector<long long int> e(ce);
  if (ce != 0)
    for (long long int i = 0; i < ce; i++) cin >> e[i];
  long long int q;
  cin >> q;
  while (q--) {
    long long int x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    if (x1 == x2) {
      cout << abs(y2 - y1) << '\n';
      continue;
    }
    long long int res;
    if (cl == 0) {
      auto it2 = lower_bound(e.begin(), e.end(), min(y1, y2));
      auto it3 = it2 - 1;
      if (it2 == e.begin()) {
        it3 = e.begin();
      }
      if (it2 == e.end()) it2--;
      long long int pos3 = it2 - e.begin();
      long long int pos4 = it3 - e.begin();
      long long int ans1 = 1e15;
      ans1 = min(abs(e[pos3] - y1) + abs(y2 - e[pos3]),
                 abs(e[pos4] - y1) + abs(y2 - e[pos4]));
      ans1 += abs(x1 - x2) / v;
      if (abs(x1 - x2) % v != 0) ans1++;
      res = ans1;
    } else if (ce == 0) {
      auto it = lower_bound(s.begin(), s.end(), min(y1, y2));
      auto it1 = it - 1;
      if (it == s.begin()) {
        it1 = s.begin();
      }
      if (it == s.end()) it--;
      long long int pos1 = it - s.begin();
      long long int pos2 = it1 - s.begin();
      long long int ans = 1e15;
      ans = min(abs(s[pos1] - y1) + abs(y2 - s[pos1]),
                abs(s[pos2] - y1) + abs(y2 - s[pos2]));
      ans += abs(x1 - x2);
      res = ans;
    } else {
      auto it = lower_bound(s.begin(), s.end(), min(y1, y2));
      auto it1 = it - 1;
      if (it == s.begin()) {
        it1 = s.begin();
      }
      auto it2 = lower_bound(e.begin(), e.end(), min(y1, y2));
      auto it3 = it2 - 1;
      if (it2 == e.begin()) {
        it3 = e.begin();
      }
      if (it == s.end()) it--;
      if (it2 == e.end()) it2--;
      long long int pos1 = it - s.begin();
      long long int pos2 = it1 - s.begin();
      long long int pos3 = it2 - e.begin();
      long long int pos4 = it3 - e.begin();
      long long int ans = 1e15, ans1 = 1e15;
      ans = min(abs(s[pos1] - y1) + abs(y2 - s[pos1]),
                abs(s[pos2] - y1) + abs(y2 - s[pos2]));
      ans += abs(x1 - x2);
      if (s.size() == 0) ans = 1e15;
      ans1 = min(abs(e[pos3] - y1) + abs(y2 - e[pos3]),
                 abs(e[pos4] - y1) + abs(y2 - e[pos4]));
      ans1 += abs(x1 - x2) / v;
      if (abs(x1 - x2) % v != 0) ans1++;
      if (e.size() == 0) ans1 = 1e15;
      res = min(ans, ans1);
    }
    cout << res << '\n';
  }
  return;
}
int main() {
  (ios::sync_with_stdio(false), cin.tie(0));
  long long int t = 1;
  while (t--) {
    solve();
  }
}
