2 10 1 1 1
1
10
1
1 5 1 8
 4 4 1 0 1
1

1
1 2 1 4
 2 5 1 0 1
2

1
1 4 1 5
 10 10 1 8 4
10
2 3 4 5 6 7 8 9
10
1 1 3 1
2 1 7 1
1 1 9 1
7 1 4 1
10 1 7 1
2 1 7 1
3 1 2 1
5 1 2 1
10 1 5 1
6 1 9 1
 2 4 1 1 1
1
4
1
1 2 1 3
 2 2 0 1 1

1
1
1 2 2 2
 1000 1000 1 1 10
1
2
1
1 900 1 1000
 5 5 1 1 1
3
2
1
1 5 1 1
 2 4 1 1 1
1
2
1
2 3 2 4
 4 4 1 0 1
4

5
1 1 2 2
1 3 2 2
3 3 4 3
3 2 2 2
1 2 2 3

3
 2
 1
 3
4
4
3
3
4
3
3
4
3
 1
 3
 100
 4
 1
 6
4
3
5
4

#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, q;
  double v;
  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;
    auto left = l.lower_bound(x1.second);
    auto right = l.lower_bound(x1.second);
    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 = e.lower_bound(x1.second);
    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(fabs(x1.first - x2.first) / v),
                           abs(*right - x1.second) + abs(*right - x2.second) +
                               ceil(fabs(x1.first - x2.first) / v));
      ans = min(dans, ans);
    }
    cout << ans << endl;
  }
  return 0;
}
