#include <bits/stdc++.h>
using namespace std;
int n, m, cl, ce, v;
int l[100005], e[100005];
int main() {
  scanf("%d%d%d%d%d", &n, &m, &cl, &ce, &v);
  for (int i = 1; i <= cl; ++i) scanf("%d", l + i);
  for (int i = 1; i <= ce; ++i) scanf("%d", e + i);
  sort(l + 1, l + 1 + cl);
  sort(e + 1, e + 1 + ce);
  int q;
  scanf("%d", &q);
  for (int i = 1; i <= q; ++i) {
    int x1, x2, y1, y2;
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    long long ans1 = 1e13, ans2 = 1e13;
    int p;
    if (x1 == x2) {
      printf("%d\n", abs(y1 - y2));
      continue;
    }
    if (cl) {
      if (l[cl] < y1) {
        ans1 = abs(x1 - x2) + abs(y1 - l[cl]) + abs(y2 - l[cl]);
      } else {
        p = lower_bound(l + 1, l + 1 + cl, y1) - l;
        ans1 = abs(x1 - x2) + abs(y1 - l[p]) + abs(y2 - l[p]);
        if (p > 1) {
          ans1 = min(ans1, 1ll * abs(x1 - x2) + abs(y1 - l[p - 1]) +
                               abs(y2 - l[p - 1]));
        }
      }
    }
    if (ce) {
      if (e[ce] < y1) {
        ans2 = (abs(x1 - x2) - 1) / v + 1 + abs(y1 - e[ce]) + abs(y2 - e[ce]);
      } else {
        p = lower_bound(e + 1, e + 1 + ce, y1) - e;
        ans2 = (abs(x1 - x2) - 1) / v + 1 + abs(y1 - e[p]) + abs(y2 - e[p]);
        if (p > 1) {
          ans2 = min(ans2, 1ll * (abs(x1 - x2) - 1) / v + 1 +
                               abs(y1 - e[p - 1]) + abs(y2 - e[p - 1]));
        }
      }
    }
    printf("%I64d\n", min(ans1, ans2));
  }
}
