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;
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-ffloat-store")
#pragma GCC optimize("-fno-defer-pop")
long long int power(long long int a, long long int b, long long int m) {
  if (b == 0) return 1;
  if (b == 1) return a % m;
  long long int t = power(a, b / 2, m) % m;
  t = (t * t) % m;
  if (b & 1) t = ((t % m) * (a % m)) % m;
  return t;
}
long long int modInverse(long long int a, long long int m) {
  return power(a, m - 2, m);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int i, j, k, l, n, m, cl, ce, v;
  cin >> n >> m >> cl >> ce >> v;
  char c;
  if (cl == 0) cin >> c;
  long long int a1[cl + 1], a2[ce + 1];
  for (i = 1; i <= cl; i++) {
    cin >> a1[i];
  }
  sort(a1 + 1, a1 + 1 + cl);
  if (ce == 0) cin >> c;
  for (i = 1; i <= ce; i++) {
    cin >> a2[i];
  }
  sort(a2 + 1, a2 + 1 + ce);
  long long int q, x1, x2, y1, y2;
  cin >> q;
  while (q--) {
    cin >> x1 >> y1 >> x2 >> y2;
    long long int m1 = 1e10, m2 = 1e10, ans = 0;
    long long int a, b = 0;
    a = lower_bound(a1 + 1, a1 + 1 + cl, y1) - a1;
    if (lower_bound(a1 + 1, a1 + 1 + cl, y1) - a1 > 1) b = a - 1;
    m1 = min(m1, abs(a1[a] - y1) + abs(a1[a] - y2));
    if (b > 0) m1 = min(m1, abs(a1[b] - y1) + abs(a1[b] - y2));
    b = 0;
    a = lower_bound(a2 + 1, a2 + 1 + cl, y1) - a2;
    if (lower_bound(a2 + 1, a2 + 1 + cl, y1) - a2 > 1) b = a - 1;
    m2 = min(m2, abs(a2[a] - y1) + abs(a2[a] - y2));
    if (b > 0) m2 = min(m2, abs(a2[b] - y1) + abs(a2[b] - y2));
    m1 = ans + m1 + abs(x1 - x2);
    m2 = ans + m2 + (abs(x1 - x2) + (v - 1)) / v;
    ans = min(m1, m2);
    cout << ans << "\n";
  }
  return 0;
}
