#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) { cerr << endl; }
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << ": " << a << " ";
  err(++it, args...);
}
const double PI = acos(-1.0);
const int MOD = 1e9 + 7;
const int INF = 2e9;
int n, m, cl, ce, v;
set<int> elevators;
set<int> stairs;
void test() {}
void read() {
  cin >> n >> m >> cl >> ce >> v;
  int stair, elevator;
  for (int i = 0; i < (int)cl; ++i) {
    cin >> stair;
    stairs.insert(stair);
  }
  for (int i = 0; i < (int)ce; ++i) {
    cin >> elevator;
    elevators.insert(elevator);
  }
}
pair<int, int> findNearest(int b, set<int>& candidates) {
  pair<int, int> nearest = {-1, -1};
  auto it1 = candidates.lower_bound(b);
  if (it1 != candidates.end()) nearest.first = *it1;
  it1 = candidates.lower_bound(b);
  if (it1 != candidates.begin()) {
    --it1;
    nearest.second = *it1;
  }
  return nearest;
}
void solve() {
  int q;
  cin >> q;
  while (q--) {
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    if (a == c) {
      cout << abs(d - b) << endl;
      continue;
    }
    if (a * m + b > c * m + d) {
      swap(a, c);
      swap(b, d);
    }
    int all_elevator = 1e9;
    int all_stair = 1e9;
    pair<int, int> nearest_elevator = findNearest(b, elevators);
    pair<int, int> nearest_stair = findNearest(b, stairs);
    if (nearest_elevator.first != -1)
      all_elevator = min(all_elevator, abs(b - nearest_elevator.first) +
                                           abs(nearest_elevator.first - d) +
                                           (int)ceil(abs(c - a) / (double)v));
    if (nearest_stair.first != -1)
      all_stair =
          min(all_stair, abs(b - nearest_stair.first) +
                             abs(nearest_stair.first - d) + (abs(c - a) / 1));
    if (nearest_elevator.second != -1)
      all_elevator = min(all_elevator, abs(b - nearest_elevator.second) +
                                           abs(nearest_elevator.second - d) +
                                           (int)ceil(abs(c - a) / (double)v));
    if (nearest_stair.second != -1)
      all_stair =
          min(all_stair, abs(b - nearest_stair.second) +
                             abs(nearest_stair.second - d) + abs(c - a));
    cout << min(all_elevator, all_stair) << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  test();
  int TC = 1;
  for (int tc = (int)1; tc <= (int)TC; ++tc) {
    read();
    solve();
  }
  return 0;
}
