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 stairs[100009];
long long lift[100009];
long long llift[100009];
long long rlift[100009];
long long lstairs[100009];
long long rstairs[100009];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, m, cl, ce, v;
  cin >> n >> m >> cl >> ce >> v;
  for (long long i = 1; i <= cl; i++) {
    cin >> stairs[i];
    rstairs[stairs[i]] = stairs[i];
    lstairs[stairs[i]] = stairs[i];
    long long pos = stairs[i] - 1;
    while (pos > 0 && rstairs[pos] == 0) {
      rstairs[pos] = rstairs[pos + 1];
      pos--;
    }
  }
  for (long long i = cl; i > 0; i--) {
    long long pos = stairs[i] + 1;
    while (pos <= m && lstairs[pos] == 0) {
      lstairs[pos] = lstairs[pos - 1];
      pos++;
    }
  }
  for (long long i = 1; i <= ce; i++) {
    cin >> lift[i];
    rlift[lift[i]] = lift[i];
    llift[lift[i]] = lift[i];
    long long pos = lift[i] - 1;
    while (pos > 0 && rlift[pos] == 0) {
      rlift[pos] = rlift[pos + 1];
      pos--;
    }
  }
  for (long long i = ce; i >= 0; i--) {
    long long pos = lift[i] + 1;
    while (pos <= m && llift[pos] == 0) {
      llift[pos] = llift[pos - 1];
      pos++;
    }
  }
  long long q;
  cin >> q;
  for (long long i = 1; i <= q; i++) {
    long long x1, x2, y1, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    if (x1 == x2) {
      cout << abs(y1 - y2) << "\n";
      continue;
    }
    long long la = lstairs[y1];
    long long lb = llift[y1];
    long long ra = rstairs[y1];
    long long rb = rlift[y1];
    long long w1, w2, w3, w4;
    if (la == 0)
      w1 = LONG_MAX;
    else
      w1 = abs(la - y1) + (x2 - x1) + abs(la - y2);
    if (lb == 0)
      w3 = LONG_MAX;
    else
      w3 = abs(lb - y1) + ceil(((x2 - x1) * 1.000) / (v * 1.0000)) +
           abs(lb - y2);
    if (ra == 0)
      w2 = LONG_MAX;
    else
      w2 = abs(ra - y1) + (x2 - x1) + abs(ra - y2);
    if (rb == 0)
      w4 = LONG_MAX;
    else
      w4 = abs(rb - y1) + ceil(((x2 - x1) * 1.000) / (v * 1.0000)) +
           abs(rb - y2);
    cout << min(min(min(w1, w2), w3), w4) << "\n";
  }
}
