#include <bits/stdc++.h>
using namespace std;
template <typename T>
std::ostream &operator<<(std::ostream &out, vector<T> &v) {
  for (typename vector<T>::size_type i = 0; i < v.size(); ++i)
    out << v[i] << " ";
  out << "\n";
  return out;
}
template <typename T>
std::ostream &operator<<(std::ostream &out, set<T> &s) {
  for (auto e : s) out << e << " ";
  out << "\n";
  return out;
}
template <typename T, typename N>
std::ostream &operator<<(std::ostream &out, pair<T, N> &p) {
  out << "(" << p.first << ", " << p.second << ") ";
  return out;
}
template <typename T, typename N>
std::ostream &operator<<(std::ostream &out, vector<pair<T, N> > &v) {
  for (size_t i = 0; i < v.size(); ++i) cout << v[i];
  out << "\n";
  return out;
}
template <typename T>
std::ostream &operator<<(std::ostream &out, vector<vector<T> > &v) {
  for (size_t i = 0; i < v.size(); ++i) {
    for (size_t j = 0; j < v[i].size(); ++j) {
      out << v[i][j] << " ";
    }
    out << "\n";
  }
  return out;
}
template <typename T>
std::ostream &operator<<(std::ostream &out, vector<set<T> > &v) {
  for (size_t i = 0; i < v.size(); ++i) {
    out << v[i];
  }
  out << "\n";
  return out;
}
int get_stair_distance(int x1, int x2, int y1, int y2, int stairs_coor, int v) {
  int time_stairs =
      abs(y1 - stairs_coor) + abs(x2 - x1) + abs(stairs_coor - y2);
  return time_stairs;
}
int get_elevator_distance(int x1, int x2, int y1, int y2, int elevators_coor,
                          int v) {
  int time_elevators = abs(y1 - elevators_coor) + (abs(x2 - x1) + v - 1) / v +
                       abs(elevators_coor - y2);
  return time_elevators;
}
void solve() {
  int n, m, cl, ce, v;
  cin >> n >> m >> cl >> ce >> v;
  vector<int> stairs(cl);
  for (int i = 0; i < cl; ++i) {
    cin >> stairs[i];
  }
  vector<int> elevators(ce);
  for (int i = 0; i < ce; ++i) {
    cin >> elevators[i];
  }
  int q;
  cin >> q;
  int x1, x2, y1, y2;
  while (q--) {
    cin >> x1 >> y1 >> x2 >> y2;
    vector<int>::iterator low_stairs =
        lower_bound(stairs.begin(), stairs.end(), y2);
    vector<int>::iterator low_elevators =
        lower_bound(elevators.begin(), elevators.end(), y2);
    int min_dist_stairs = 2e9;
    if (cl) {
      if (low_stairs == stairs.begin()) {
        min_dist_stairs = get_stair_distance(x1, x2, y1, y2, *low_stairs, v);
      } else if (low_stairs == stairs.end()) {
        min_dist_stairs = get_stair_distance(x1, x2, y1, y2, stairs.back(), v);
      } else {
        auto prev = low_stairs;
        --prev;
        min_dist_stairs =
            min(get_stair_distance(x1, x2, y1, y2, *low_stairs, v),
                get_stair_distance(x1, x2, y1, y2, *prev, v));
      }
    }
    int min_dist_elevators = 2e9;
    if (ce) {
      if (low_elevators == elevators.begin()) {
        min_dist_elevators =
            get_elevator_distance(x1, x2, y1, y2, *elevators.begin(), v);
      } else if (low_elevators == elevators.end()) {
        min_dist_elevators =
            get_elevator_distance(x1, x2, y1, y2, elevators.back(), v);
      } else {
        auto prev = low_elevators;
        --prev;
        min_dist_elevators =
            min(get_elevator_distance(x1, x2, y1, y2, *low_elevators, v),
                get_elevator_distance(x1, x2, y1, y2, *prev, v));
      }
    }
    int ans = min(min_dist_elevators, min_dist_stairs);
    if (x1 == x2) {
      ans = abs(y2 - y1);
    }
    cout << ans << "\n";
  }
  return;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
