#include <bits/stdc++.h>
using namespace std;
const bool debug = false;
const bool INJUDGE = false;
int n, m, c1, c2, v, q;
int e[100005], s[100005];
int fns(int j) {
  int f = 0, t = c1 - 1, m;
  while (f <= t) {
    m = (f + t) >> 1;
    if (s[m] > j) {
      t = m - 1;
    } else {
      f = m + 1;
    }
  }
  return t;
}
int fne(int j) {
  int f = 0, t = c2 - 1, m;
  while (f <= t) {
    m = (f + t) >> 1;
    if (e[m] > j) {
      t = m - 1;
    } else {
      f = m + 1;
    }
  }
  return t;
}
int main() {
  scanf("%d%d%d%d%d", &n, &m, &c1, &c2, &v);
  for (int i = 0; i < c1; i++) scanf("%d", &s[i]), s[i]--;
  for (int i = 0; i < c2; i++) scanf("%d", &e[i]), e[i]--;
  scanf("%d", &q);
  for (int i = 0; i < q; i++) {
    int x1, x2, y1, y2;
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    x1--, y1--, x2--, y2--;
    if (x1 == x2) {
      printf("%d\n", abs(y2 - y1));
      continue;
    }
    int cost1 = 2e9 + 7, cost2 = 2e9 + 7, cost3 = 2e9 + 7, cost4 = 2e9 + 7;
    int ne, ns;
    int t = fne(y1);
    if (t >= 0) {
      ne = e[t];
      cost1 = (abs(x2 - x1) % v ? abs(x2 - x1) / v + 1 : abs(x2 - x1) / v) +
              abs(ne - y1) + abs(ne - y2);
    }
    if (t + 1 < c2) {
      ne = e[t + 1];
      cost3 = (abs(x2 - x1) % v ? abs(x2 - x1) / v + 1 : abs(x2 - x1) / v) +
              abs(ne - y1) + abs(ne - y2);
    }
    t = fns(y1);
    if (t >= 0) {
      ns = s[t];
      cost2 = abs(x2 - x1) + abs(ns - y1) + abs(y2 - ns);
    }
    if (t + 1 < c1) {
      ns = s[t + 1];
      cost4 = abs(x2 - x1) + abs(ns - y1) + abs(y2 - ns);
    }
    printf("%d\n", min(min(cost1, cost2), min(cost3, cost4)));
  }
  return 0;
}
