#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
void fast_io() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
using namespace std;
int main() {
  int n, m, cl, ce, v;
  scanf("%d %d %d %d %d", &n, &m, &cl, &ce, &v);
  vector<int> l(cl);
  for (int i = 0; i < int(cl); i++) scanf("%d", &l[i]);
  vector<int> e(ce);
  for (int i = 0; i < int(ce); i++) scanf("%d", &e[i]);
  int q;
  scanf("%d", &q);
  while (q--) {
    int x1, y1, x2, y2;
    scanf("%d %d %d %d", &y1, &x1, &y2, &x2);
    if (y1 == y2)
      printf("%d\n", abs(x1 - x2));
    else {
      auto closeL = upper_bound((l).begin(), (l).end(), x1);
      auto closeE = upper_bound((e).begin(), (e).end(), x1);
      if (closeL == l.end()) --closeL;
      if (closeE == e.end()) --closeE;
      int cll = closeL - l.begin();
      int cle = closeE - e.begin();
      int ans = 2000000000;
      for (int i = max(0, cle - 1); i <= min(ce - 1, cle); i++)
        ans = min(ans,
                  abs(x1 - e[i]) + abs(x2 - e[i]) + (abs(y1 - y2) + v - 1) / v);
      for (int i = max(0, cll - 1); i <= min(cl - 1, cll); i++)
        ans = min(ans, abs(x1 - l[i]) + abs(x2 - l[i]) + abs(y1 - y2));
      closeL = upper_bound((l).begin(), (l).end(), x2);
      closeE = upper_bound((e).begin(), (e).end(), x2);
      if (closeL == l.end()) --closeL;
      if (closeE == e.end()) --closeE;
      cll = closeL - l.begin();
      cle = closeE - e.begin();
      for (int i = max(0, cle - 1); i <= min(ce - 1, cle); i++)
        ans = min(ans,
                  abs(x1 - e[i]) + abs(x2 - e[i]) + (abs(y1 - y2) + v - 1) / v);
      for (int i = max(0, cll - 1); i <= min(cl - 1, cll); i++)
        ans = min(ans, abs(x1 - l[i]) + abs(x2 - l[i]) + abs(y1 - y2));
      printf("%d\n", ans);
    }
  }
  return 0;
}
