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;
long long i, j, k, l, n, m, v, szel, szst, q, n1, n2, m1, m2, res1, res2, k1,
    k2, res;
typedef long long arr[100009];
arr el, st;
long long ts(arr &a, long long sz, long long num) {
  long long l = 1, r = sz, lastl = 1, lastr = sz, m1, m2, res, mini = 1e15 + 9;
  while (l - r > 0) {
    m1 = l + (r - l) / 3;
    m2 = r - (r - l) / 3;
    if (abs(a[m1] - num) > abs(a[m2] - num))
      l = m1;
    else
      r = m2;
    if (lastl == l && lastr == r) break;
  }
  if (l == r) return a[l];
  for (int i = l; i <= r; i++) {
    if (abs(a[i] - num) < mini) {
      mini = abs(a[i] - num);
      res = i;
    }
  }
  return a[res];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> m >> szst >> szel >> v;
  for (i = 1; i <= szst; i++) cin >> st[i];
  for (i = 1; i <= szel; i++) cin >> el[i];
  cin >> q;
  for (i = 1; i <= q; i++) {
    cin >> m1 >> n1 >> m2 >> n2;
    if (m1 == m2) {
      cout << abs(n1 - n2) << endl;
      continue;
    }
    res = 1e15 + 9;
    auto b = lower_bound(st + 1, st + 1 + szst, n1);
    k2 = *b;
    if (b != st) b--;
    k1 = *b;
    if (k1 == 0) k1 = 1e15 + 9;
    if (k2 == 0) k2 = 1e15 + 9;
    res1 = abs(n1 - k1) + abs(m2 - m1) + abs(n2 - k1);
    res = min(res, res1);
    res2 = abs(k2 - n1) + abs(m2 - m1) + abs(n2 - k2);
    res = min(res, res2);
    auto c = lower_bound(el + 1, el + 1 + szel, n1);
    k2 = *c;
    if (c != el) c--;
    k1 = *c;
    if (k1 == 0) k1 = 1e15 + 9;
    if (k2 == 0) k2 = 1e15 + 9;
    res1 = abs(n1 - k1) + abs(m2 - m1) / v + (abs(m2 - m1) % v == 0 ? 0 : 1) +
           abs(n2 - k1);
    res = min(res, res1);
    res2 = abs(k2 - n1) + abs(m2 - m1) / v + (abs(m2 - m1) % v == 0 ? 0 : 1) +
           abs(n2 - k2);
    res = min(res, res2);
    cout << res << endl;
  }
  exit(0);
}
