#include <bits/stdc++.h>
const double PI = acos(-1.0);
using namespace std;
template <typename T1, typename T2>
istream& operator>>(istream& is, pair<T1, T2>& v) {
  is >> v.first >> v.second;
  return is;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& os, pair<T1, T2>& v) {
  os << "{";
  os << v.first << ", " << v.second;
  os << "}";
  return os;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& os, map<T1, T2>& v) {
  os << "[";
  for (auto a : v) {
    os << a << ' ';
  }
  os << "]" << endl;
  return os;
}
template <typename T>
istream& operator>>(istream& is, vector<T>& v) {
  for (int i = 0; i < v.size(); ++i) {
    is >> v[i];
  }
  return is;
}
template <typename T>
ostream& operator<<(ostream& os, vector<T>& v) {
  os << "[";
  for (int i = 0; i < v.size(); ++i) {
    os << v[i];
    if (i != v.size() - 1) os << " ";
  }
  os << "]" << endl;
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, deque<T>& v) {
  os << "[";
  for (int i = 0; i < v.size(); ++i) {
    os << v[i];
    if (i != v.size() - 1) os << " ";
  }
  os << "]" << endl;
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, set<T>& v) {
  os << "[";
  int i = 0;
  for (auto a : v) {
    os << a;
    if (i != v.size() - 1) os << " ";
  }
  os << "]" << endl;
  return os;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, m, c1, c2, v, q;
  cin >> n >> m >> c1 >> c2 >> v;
  set<long long> l, e;
  for (int i = 0; i < c1; ++i) {
    long long x;
    cin >> x;
    l.insert(x);
  }
  for (int i = 0; i < c2; ++i) {
    long long x;
    cin >> x;
    e.insert(x);
  }
  cin >> q;
  for (int i = 0; i < q; ++i) {
    long long ans = 1000000000000000000;
    pair<long long, long long> x1, x2;
    cin >> x1 >> x2;
    long long x = abs(x1.second - x2.second);
    if (x1.first == x2.first) {
      cout << x << endl;
      continue;
    }
    auto left = l.lower_bound(x1.second);
    auto right = left;
    if (l.size()) {
      if (left == l.end()) {
        --left;
        --right;
      } else if (left != l.begin()) {
        --left;
      }
      ans = min(abs(*left - x1.second) + abs(*left - x2.second) +
                    abs(x1.first - x2.first),
                abs(*right - x1.second) + abs(*right - x2.second) +
                    abs(x1.first - x2.first));
    }
    left = e.lower_bound(x1.second);
    right = left;
    if (e.size()) {
      if (left == e.end()) {
        --left;
        --right;
      } else if (left != e.begin()) {
        --left;
      }
      long long dans = min(abs(*left - x1.second) + abs(*left - x2.second) +
                               ceil((double)abs(x1.first - x2.first) / v),
                           abs(*right - x1.second) + abs(*right - x2.second) +
                               ceil((double)abs(x1.first - x2.first) / v));
      ans = min(dans, ans);
    }
    cout << ans << endl;
  }
  return 0;
}
