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 bool debugging = 1;
using namespace std;
template <class T>
ostream &operator<<(ostream &os, vector<T> V) {
  for (auto v : V) {
    os << v << " ";
  }
  return os << "";
}
template <class T>
ostream &operator<<(ostream &os, set<T> S) {
  for (auto s : S) {
    os << s << " ";
  }
  return os << "";
}
template <class L, class R>
ostream &operator<<(ostream &os, pair<L, R> P) {
  return os << P.first << " " << P.second;
}
template <class L, class R>
ostream &operator<<(ostream &os, map<L, R> M) {
  os << "\n";
  for (auto m : M) {
    os << m << "\n";
  }
  return os << "";
}
long long use_lift(long long x1, long long x2, long long y1, long long y2,
                   long long v, long long y) {
  long long ans = abs(y2 - y) + abs(y - y1) + (abs(x2 - x1) - 1) / v + 1;
  return ans;
}
long long use_stairs(long long x1, long long x2, long long y1, long long y2,
                     long long y) {
  long long ans = abs(y2 - y) + abs(y - y1) + abs(x2 - x1);
  return ans;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long N, M, S, E, V;
  cin >> N >> M >> S >> E >> V;
  set<long long> stairs;
  for (long long i = 0; i < S; i++) {
    long long loc;
    cin >> loc;
    stairs.insert(loc);
  }
  set<long long> lift;
  for (long long i = 0; i < E; i++) {
    long long loc;
    cin >> loc;
    lift.insert(loc);
  }
  long long Q;
  cin >> Q;
  for (long long query = 0; query < Q; query++) {
    long long x1, x2, y1, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    if (x1 == x2) {
      cout << abs(y2 - y1) << "\n";
      continue;
    }
    long long ans = INT64_MAX;
    auto it = stairs.lower_bound(y1);
    if (it != stairs.end()) {
      ans = min(ans, use_stairs(x1, x2, y1, y2, *it));
    }
    if (it != stairs.begin()) {
      it--;
      ans = min(ans, use_stairs(x1, x2, y1, y2, *it));
    }
    it = lift.lower_bound(y1);
    if (it != lift.end()) {
      ans = min(ans, use_lift(x1, x2, y1, y2, V, *it));
    }
    if (it != lift.begin()) {
      it--;
      ans = min(ans, use_lift(x1, x2, y1, y2, V, *it));
    }
    cout << ans << "\n";
  }
  return 0;
}
