#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
struct Timer {
  static map<string, Timer> ar;
  long long time;
  long long last;
  bool running;
  int count;
  Timer() : time(0), running(false), count(0) {}
  void start() {}
  void stop() {}
  static void start(string name) {}
  static void stop(string name) {}
  long double time_f() { return 0; }
  long double avg_time_f() { return 0; }
};
map<string, Timer> Timer::ar;
struct TimerRegion {
  string name;
  TimerRegion(string _name) : name(_name) { Timer::start(name); }
  ~TimerRegion() { Timer::stop(name); }
};
const int MAXN = (int)1e5 + 10;
bool inside(int x, int l, int r) { return l <= x && x < r; }
void solve() {
  TimerRegion timer_func(__FUNCTION__);
  ;
  int n, m, cl, ce, v;
  cin >> n >> m >> cl >> ce >> v;
  static int ladders[MAXN];
  static int elevators[MAXN];
  for (int i = 0; i < cl; ++i) cin >> ladders[i];
  for (int i = 0; i < ce; ++i) cin >> elevators[i];
  sort(ladders, ladders + cl);
  sort(elevators, elevators + ce);
  int q;
  cin >> q;
  static int ladder_indices[2];
  static int elevator_indices[2];
  for (int i = 0; i < q; ++i) {
    int r1, c1, r2, c2;
    cin >> r1 >> c1 >> r2 >> c2;
    ladder_indices[0] = upper_bound(ladders, ladders + cl, c1) - ladders;
    ladder_indices[1] = ladder_indices[0] - 1;
    elevator_indices[0] =
        upper_bound(elevators, elevators + ce, c1) - elevators;
    elevator_indices[1] = elevator_indices[0] - 1;
    int res = (int)1e9;
    for (int j = 0; j < 2; ++j)
      if (inside(ladder_indices[j], 0, cl)) {
        int c = ladders[ladder_indices[j]];
        res = min(res, abs(c1 - c) + abs(r1 - r2) + abs(c - c2));
      }
    for (int j = 0; j < 2; ++j)
      if (inside(elevator_indices[j], 0, ce)) {
        int c = elevators[elevator_indices[j]];
        res = min(res, abs(c1 - c) + (abs(r1 - r2) + v - 1) / v + abs(c - c2));
      }
    if (r1 == r2) res = min(res, abs(c1 - c2));
    cout << res << '\n';
  }
}
int main() {
  ios::sync_with_stdio(false);
  solve();
  return 0;
}
