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 mod = 1e9 + 7;
bool sortinrev(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.first > b.first);
}
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int min(long long int a, long long int b) {
  if (a < b)
    return a;
  else
    return b;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int ab, n, m, cl, ce, v, t;
  cin >> n >> m >> cl >> ce >> v;
  vector<long long int> a, b;
  for (long long int i = 0; i < cl; i++) {
    cin >> ab;
    a.push_back(ab);
  }
  for (long long int i = 0; i < ce; i++) {
    cin >> ab;
    b.push_back(ab);
  }
  cin >> t;
  long long int x1, x2, y1, y2, p, q, r, s, sum = 0;
  while (t--) {
    cin >> y1 >> x1 >> y2 >> x2;
    sum = 0;
    auto c = upper_bound(a.begin(), a.end(), x1);
    auto e = upper_bound(b.begin(), b.end(), x1);
    long long int ind1 = c - a.begin();
    long long int ind2 = e - b.begin();
    q = 9999999999999999;
    s = 9999999999999999;
    p = ind1;
    if (ind1 != 0) q = ind1 - 1;
    r = ind2;
    if (ind2 != 0) s = ind2 - 1;
    if (ind1 == cl) {
      p = 9999999999999999;
    }
    if (ind2 == ce) {
      r = 9999999999999999;
    }
    if (p != 9999999999999999) p = a[p];
    if (q != 9999999999999999) q = a[q];
    if (r != 9999999999999999) r = b[r];
    if (s != 9999999999999999) s = b[s];
    sum = min(min(abs(p - x1) + abs(p - x2) + abs(y2 - y1),
                  abs(q - x1) + abs(q - x2) + abs(y2 - y1)),
              min(abs(r - x1) + abs(r - x2) +
                      (long long int)ceil(abs(y2 - y1) / (double)v),
                  abs(s - x1) + abs(s - x2) +
                      (long long int)ceil(abs(y2 - y1) / (double)v)));
    cout << sum << endl;
  }
  return 0;
}
