#include <bits/stdc++.h>
using namespace std;
const int INF = 2e9;
int n, m, cl, cee, v, s[100005], e[100005], cs[100005], ce[100005], bs[100005],
    be[100005];
struct qu {
  int x, y, xx, yy;
} q[100005];
int main() {
  scanf("%d%d%d%d%d", &n, &m, &cl, &cee, &v);
  s[0] = -1e9;
  for (int i = 1; i <= cl; i++) scanf("%d", &s[i]);
  s[++cl] = 1e9;
  e[0] = -1e9;
  for (int i = 1; i <= cee; i++) scanf("%d", &e[i]);
  e[++cee] = 1e9;
  int qe;
  scanf("%d", &qe);
  vector<int> ycor;
  for (int i = 0; i < qe; i++) {
    int x, y, xx, yy;
    scanf("%d%d%d%d", &q[i].x, &q[i].y, &q[i].xx, &q[i].yy);
    ycor.push_back(q[i].y);
  }
  sort(ycor.begin(), ycor.end());
  ycor.resize(unique(ycor.begin(), ycor.end()) - ycor.begin());
  int p = 0;
  int p1 = 0;
  for (int i = 0; i < ycor.size(); i++) {
    while (s[p + 1] <= ycor[i]) p++;
    cs[i] = p;
    while (e[p1 + 1] <= ycor[i]) p1++;
    ce[i] = p1;
  }
  p = cl;
  p1 = cee;
  for (int i = ycor.size() - 1; i >= 0; i--) {
    while (s[p - 1] >= ycor[i]) p--;
    bs[i] = p;
    while (e[p1 - 1] >= ycor[i]) p1--;
    be[i] = p1;
  }
  for (int i = 0; i < qe; i++) {
    int res = INF;
    int xx = abs(q[i].x - q[i].xx);
    int ind = lower_bound(ycor.begin(), ycor.end(), q[i].y) - ycor.begin();
    if (cs[ind] != 0)
      res = min(res, xx + abs(q[i].y - s[cs[ind]]) + abs(s[cs[ind]] - q[i].yy));
    if (bs[ind] != cl)
      res = min(res, xx + abs(q[i].y - s[bs[ind]]) + abs(s[bs[ind]] - q[i].yy));
    if (ce[ind] != 0)
      res = min(res, (int)ceil(xx * 1.0 / v) + abs(q[i].y - e[ce[ind]]) +
                         abs(e[ce[ind]] - q[i].yy));
    if (be[ind] != cee)
      res = min(res, (int)ceil(xx * 1.0 / v) + abs(q[i].y - e[be[ind]]) +
                         abs(e[be[ind]] - q[i].yy));
    if (xx == 0) res = min(res, abs(q[i].y - q[i].yy));
    printf("%d\n", res);
  }
}
