2 10 1 1 1
1
10
1
1 5 1 8
 4 4 1 0 1
1

1
1 2 1 4
 2 5 1 0 1
2

1
1 4 1 5
 10 10 1 8 4
10
2 3 4 5 6 7 8 9
10
1 1 3 1
2 1 7 1
1 1 9 1
7 1 4 1
10 1 7 1
2 1 7 1
3 1 2 1
5 1 2 1
10 1 5 1
6 1 9 1
 2 4 1 1 1
1
4
1
1 2 1 3
 2 2 0 1 1

1
1
1 2 2 2
 1000 1000 1 1 10
1
2
1
1 900 1 1000
 5 5 1 1 1
3
2
1
1 5 1 1
 2 4 1 1 1
1
2
1
2 3 2 4
 4 4 1 0 1
4

5
1 1 2 2
1 3 2 2
3 3 4 3
3 2 2 2
1 2 2 3

3
 2
 1
 3
4
4
3
3
4
3
3
4
3
 1
 3
 100
 4
 1
 6
4
3
5
4

#include <bits/stdc++.h>
long long const Q = 100000;
long long const C = 100000;
long long const INF = std::numeric_limits<long long>::max() / 2;
long long const NINF = std::numeric_limits<long long>::min() / 2;
long long stairs[C + 1];
long long lifters[C + 1];
signed main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  std::cout.tie(0);
  long long n, m;
  long long s, e;
  long long v;
  std::cin >> n >> m >> s >> e >> v;
  for (long long i = 1; i <= s; i++) {
    std::cin >> stairs[i];
  }
  for (long long i = 1; i <= e; i++) {
    std::cin >> lifters[i];
  }
  std::sort(stairs + 1, stairs + 1 + s);
  std::sort(lifters + 1, lifters + 1 + e);
  long long q;
  std::cin >> q;
  for (long long i = 1; i <= q; i++) {
    long long x1, y1;
    long long x2, y2;
    std::cin >> x1 >> y1 >> x2 >> y2;
    long long min = INF;
    if (x1 == x2) {
      min = std::abs(y2 - y1);
    } else {
      if (e) {
        long long left = 1;
        long long right = e;
        long long ans = 0;
        while (left <= right) {
          long long mid = (left + right) / 2;
          if (lifters[mid] <= y2) {
            ans = mid;
            left = mid + 1;
          } else {
            right = mid - 1;
          }
        }
        for (long long j = std::max(1ll, ans - 3); j <= std::min(e, ans + 3);
             j++) {
          min = std::min(min, std::abs(lifters[j] - y2) +
                                  std::abs(lifters[j] - y1) +
                                  (std::abs(x1 - x2) + v - 1) / v);
        }
        left = 1;
        right = e;
        ans = 0;
        while (left <= right) {
          long long mid = (left + right) / 2;
          if (lifters[mid] <= y1) {
            ans = mid;
            left = mid + 1;
          } else {
            right = mid - 1;
          }
        }
        for (long long j = std::max(1ll, ans - 3); j <= std::min(e, ans + 3);
             j++) {
          min = std::min(min, std::abs(lifters[j] - y2) +
                                  std::abs(lifters[j] - y1) +
                                  (std::abs(x1 - x2) + v - 1) / v);
        }
      }
      if (s) {
        long long left = 1;
        long long right = s;
        long long ans = 0;
        while (left <= right) {
          long long mid = (left + right) / 2;
          if (stairs[mid] <= y2) {
            ans = mid;
            left = mid + 1;
          } else {
            right = mid - 1;
          }
        }
        for (long long j = std::max(1ll, ans - 3); j <= std::min(s, ans + 3);
             j++) {
          min = std::min(min, std::abs(stairs[j] - y2) +
                                  std::abs(stairs[j] - y1) + std::abs(x1 - x2));
        }
        left = 1;
        right = s;
        ans = 0;
        while (left <= right) {
          long long mid = (left + right) / 2;
          if (stairs[mid] <= y1) {
            ans = mid;
            left = mid + 1;
          } else {
            right = mid - 1;
          }
        }
        for (long long j = std::max(1ll, ans - 3); j <= std::min(s, ans + 3);
             j++) {
          min = std::min(min, std::abs(stairs[j] - y2) +
                                  std::abs(stairs[j] - y1) + std::abs(x2 - x1));
        }
      }
    }
    std::cout << min << '\n';
  }
  return 0;
}
