#include <bits/stdc++.h>
using namespace std;
long long l[1000005], e[1000005];
int main() {
  long long n, m, ci, vi, v;
  memset(l, 0, sizeof(l));
  memset(e, 0, sizeof(e));
  scanf("%lld%lld%lld%lld%lld", &n, &m, &ci, &vi, &v);
  for (long long i = 1; i <= ci; i++) {
    scanf("%lld", &l[i]);
  }
  for (long long i = 1; i <= vi; i++) scanf("%lld", &e[i]);
  sort(l, l + ci);
  sort(e, e + vi);
  long long q;
  scanf("%lld", &q);
  while (q--) {
    long long lx, ly, rx, ry;
    scanf("%lld%lld%lld%lld", &lx, &ly, &rx, &ry);
    if (lx == rx)
      printf("%lld\n", abs(ry - ly));
    else {
      long long sum;
      int flag = 0;
      long long ans = 100000000000;
      if (ci != 0) {
        long long li = lower_bound(l, l + ci, ly) - l;
        ans = min(ans, abs(ly - l[li]) + abs(rx - lx) + abs(ry - l[li]));
        if (li > 1) {
          ans = min(ans,
                    abs(ly - l[li - 1]) + abs(rx - lx) + abs(ry - l[li - 1]));
        }
      }
      long long ans1 = 10000000000;
      if (vi != 0) {
        long long ei = lower_bound(e, e + vi, ly) - e;
        ans1 = min(ans1, abs(e[ei] - ly) + abs(e[ei] - ry) +
                             (long long)(ceil(abs(rx - lx) / (v * 1.0))));
        if (ei > 1) {
          ans1 = min(ans1, abs(e[ei - 1] - ly) + abs(e[ei - 1] - ry) +
                               (long long)(ceil(abs(rx - lx) / (v * 1.0))));
        }
      }
      ans = min(ans, ans1);
      printf("%lld\n", ans);
    }
  }
}
