#include <bits/stdc++.h>
using namespace std;
const long long maxN = 1e18;
const long long minN = -1e18;
const long long MOD = 1e9 + 7;
const long long MOD1 = 998244353;
const int baseHash = 331;
const int bigNumLength = 5000;
const long double PI = acos(-1);
const long long limit = 2e5 + 5;
const long long limit1 = 1e6 + 5;
const long long limit2 = 1e3 + 5;
long long n, m, st, ele, v, q;
long long elevator[limit], stair[limit];
long long bsl(long long l, long long r, long long a[], long long val) {
  long long ans = maxN;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (a[mid] <= val) {
      ans = mid;
      l = mid + 1;
    } else
      r = mid - 1;
  }
  return (ans == maxN) ? ans : a[ans];
}
long long bsr(long long l, long long r, long long a[], long long val) {
  long long ans = maxN;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (a[mid] >= val) {
      ans = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  return (ans == maxN) ? ans : a[ans];
}
void solveProblem() {
  long long x1, y1, x2, y2;
  cin >> x1 >> y1 >> x2 >> y2;
  if (x1 == x2) {
    cout << abs(y2 - y1) << '\n';
    return;
  }
  long long ans, res;
  long long a = bsl(1, st, stair, y1), b = bsr(1, st, stair, y1),
            c = bsl(1, ele, elevator, y1), d = bsr(1, ele, elevator, y1);
  ans = min(abs(a - y1) + abs(x2 - x1) + abs(a - y2),
            abs(b - y1) + abs(x2 - x1) + abs(b - y2));
  res = min(abs(c - y1) + (abs(x2 - x1) + v - 1) / v + abs(c - y2),
            abs(d - y1) + (abs(x2 - x1) + v - 1) / v + abs(d - y2));
  cout << min(ans, res) << '\n';
}
void fastInput() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
void readInput() {
  cin >> n >> m >> st >> ele >> v;
  for (int i = (1); i <= (st); ++i) cin >> stair[i];
  for (int i = (1); i <= (ele); ++i) cin >> elevator[i];
  cin >> q;
  while (q--) solveProblem();
}
int main() {
  fastInput();
  readInput();
}
