#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 9;
int n, m, num[2], a[2][111111], v;
int lower_bound(int left, int right, int flag, int x) {
  int mid;
  while (left <= right) {
    mid = (left + right) >> 1;
    if (a[flag][mid] < x)
      left = mid + 1;
    else
      right = mid - 1;
  }
  return left;
}
int main() {
  scanf("%d%d%d%d%d", &n, &m, &num[0], &num[1], &v);
  int i, j, s, p, q;
  for (i = 0; i < 2; i++) {
    for (j = 0; j < num[i]; j++) scanf("%d", &a[i][j]);
    sort(a[i], a[i] + num[i]);
  }
  int x1, y1, x2, y2, num_q;
  scanf("%d", &num_q);
  while (num_q--) {
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    if (x1 == x2) {
      printf("%d\n", abs(y1 - y2));
      continue;
    }
    int ans = inf;
    int x = lower_bound(0, num[1] - 1, 1, y1);
    if (x < num[1])
      ans = (abs(x1 - x2) + v - 1) / v + abs(y2 - a[1][x]) + abs(y1 - a[1][x]);
    x--;
    if (x >= 0)
      ans = min(ans, (abs(x1 - x2) + v - 1) / v + abs(y2 - a[1][x]) +
                         abs(y1 - a[1][x]));
    x = lower_bound(0, num[0] - 1, 0, y1);
    if (x < num[0])
      ans = min(ans, abs(x1 - x2) + abs(y2 - a[0][x]) + abs(y1 - a[0][x]));
    x--;
    if (x >= 0)
      ans = min(ans, abs(x1 - x2) + abs(y2 - a[0][x]) + abs(y1 - a[0][x]));
    printf("%d\n", ans);
  }
  return 0;
}
