#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
using namespace std;
template <typename T>
constexpr long long infValue =
    std::is_same<T, int>::value ? 2000100007 : 8600000000000000007ll;
template <typename T>
constexpr long long maxValue =
    std::is_same<T, int>::value ? 1000000007 : 1000000000000000001ll;
const long long INF = infValue<long long>;
const long long MOD = 1000000007ll;
const double EPS = 1e-6;
const long long MAX = maxValue<long long>;
int n, m, ce, cl, v, q;
int l[100011], e[100011];
int x1, x2, y1_, y2;
long long answ, d;
long long kk = 1;
int main(void) {
  scanf("%d %d %d %d %d", &n, &m, &cl, &ce, &v);
  for (register long long i = 0; i < cl; ++i) scanf("%d", l + i);
  for (register long long i = 0; i < ce; ++i) scanf("%d", e + i);
  scanf("%d", &q);
  long long tst = 1;
  while (q--) {
    scanf("%d %d %d %d", &x1, &y1_, &x2, &y2), answ = INF;
    long long i = lower_bound(l, l + cl, y1_) - l - kk;
    long long j = lower_bound(e, e + ce, y1_) - e - kk;
    for (register long long k = -kk; k < kk; ++k) {
      d = INF;
      if (i >= 0 && i < cl) d = abs(y1_ - l[i]) + abs(l[i] - y2) + abs(x1 - x2);
      ++i;
      answ = min(d, answ);
    }
    for (register long long k = -kk; k < kk; ++k) {
      d = INF;
      if (j >= 0 && j < ce)
        d = abs(y1_ - e[j]) + abs(e[j] - y2) + (abs(x1 - x2) + v - 1) / v;
      answ = min(d, answ);
      ++j;
    }
    if (x1 == x2) answ = abs(y1_ - y2);
    printf("%lld\n", answ);
    if (80262 == ce && 10168 == tst) {
    }
    ++tst;
  }
  return 0;
}
