#include <bits/stdc++.h>
using namespace std;
long long n, m, cl, ce, v;
vector<long long> stairs;
vector<long long> elevators;
long long closest(std::vector<long long> const& vec, long long value) {
  auto const it = std::lower_bound(vec.begin(), vec.end(), value);
  if (it == vec.end()) {
    return (vec.size() - 1);
  }
  return (it - vec.begin());
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> cl >> ce >> v;
  stairs.resize(cl);
  elevators.resize(ce);
  for (int i = 0; i < cl; i++) cin >> stairs[i], stairs[i]--;
  for (int i = 0; i < ce; i++) cin >> elevators[i], elevators[i]--;
  long long q;
  cin >> q;
  while (q--) {
    long long x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    x1--, y1--, x2--, y2--;
    if (x1 == x2) {
      cout << abs(y1 - y2) << endl;
      continue;
    }
    long long pos_right_stairs = closest(stairs, y1);
    long long pos_left_stairs = pos_right_stairs;
    if (pos_right_stairs > 0 && stairs.size() > 0)
      pos_left_stairs = pos_right_stairs - 1;
    long long sol_right_stairs, sol_right_elevator, sol_left_elevator;
    long long sol_left_stairs;
    long long pos_right_elevators = closest(elevators, y1);
    long long pos_left_elevators = pos_right_elevators;
    if (pos_right_elevators > 0 && elevators.size() > 0)
      pos_left_elevators = pos_right_elevators - 1;
    if (cl != 0) {
      sol_right_stairs = (abs(y1 - stairs[pos_right_stairs]) +
                          abs(y2 - stairs[pos_right_stairs]) + abs(x1 - x2));
      sol_left_stairs = (abs(y1 - stairs[pos_left_stairs]) +
                         abs(y2 - stairs[pos_left_stairs]) + abs(x1 - x2));
    }
    if (ce != 0) {
      sol_right_elevator = (abs(y1 - elevators[pos_right_elevators]) +
                            abs(y2 - elevators[pos_right_elevators]) +
                            ((abs(x1 - x2) / v) + ((abs(x1 - x2) % v) != 0)));
      sol_left_elevator = (abs(y1 - elevators[pos_left_elevators]) +
                           abs(y2 - elevators[pos_left_elevators]) +
                           ((abs(x1 - x2) / v) + ((abs(x1 - x2) % v) != 0)));
    }
    if (cl == 0) sol_right_stairs = LLONG_MAX, sol_left_stairs = LLONG_MAX;
    if (ce == 0) sol_right_elevator = LLONG_MAX, sol_left_elevator = LLONG_MAX;
    cout << min(min(sol_left_elevator, sol_right_elevator),
                min(sol_left_stairs, sol_right_stairs))
         << endl;
  }
  return 0;
}
