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>
using namespace std;
const long long maxN = 1e18;
const long long minN = -1e18;
const long long MOD = 1e9 + 7;
const long long MOD1 = 998244353;
const int baseHash = 331;
const int bigNumLength = 5000;
const long double PI = acos(-1);
const long long limit = 2e5 + 5;
const long long limit1 = 1e6 + 5;
const long long limit2 = 1e3 + 5;
long long n, m, st, ele, v, q;
long long elevator[limit], stair[limit];
long long bsl(long long l, long long r, long long a[], long long val) {
  long long ans = maxN;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (a[mid] <= val) {
      ans = mid;
      l = mid + 1;
    } else
      r = mid - 1;
  }
  return (ans == maxN) ? ans : a[ans];
}
long long bsr(long long l, long long r, long long a[], long long val) {
  long long ans = maxN;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (a[mid] >= val) {
      ans = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  return (ans == maxN) ? ans : a[ans];
}
void solveProblem() {
  long long x1, y1, x2, y2;
  cin >> x1 >> y1 >> x2 >> y2;
  if (x1 == x2) {
    cout << abs(y2 - y1) << '\n';
    return;
  }
  long long ans, res;
  long long a = bsl(1, st, stair, y1), b = bsr(1, st, stair, y1),
            c = bsl(1, ele, elevator, y1), d = bsr(1, ele, elevator, y1);
  ans = min(abs(a - y1) + abs(x2 - x1) + abs(a - y2),
            abs(b - y1) + abs(x2 - x1) + abs(b - y2));
  res = min(abs(c - y1) + (abs(x2 - x1) + v - 1) / v + abs(c - y2),
            abs(d - y1) + (abs(x2 - x1) + v - 1) / v + abs(d - y2));
  cout << min(ans, res) << '\n';
}
void fastInput() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
void readInput() {
  cin >> n >> m >> st >> ele >> v;
  for (int i = (1); i <= (st); ++i) cin >> stair[i];
  for (int i = (1); i <= (ele); ++i) cin >> elevator[i];
  cin >> q;
  while (q--) solveProblem();
}
int main() {
  fastInput();
  readInput();
}
