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 int LIM = 1e5 + 5, MOD = 1e9;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long fastpowMOD(long long a, long long p, long long MOD) {
  if (p == 0) return 1;
  long long z = fastpowMOD(a, p / 2, MOD);
  z = (z * z) % MOD;
  if (p % 2) z = (z * a) % MOD;
  return z;
}
bool seive[100005];
void SieveOfEratosthenes(long long n) {
  memset(seive, true, sizeof(seive));
  for (long long p = 2; p * p <= n; p++)
    if (seive[p] == true)
      for (long long i = p * p; i <= n; i += p) seive[i] = false;
}
typedef struct {
  long long one, two, three;
} data;
vector<long long> factorize(long long temp) {
  vector<long long> fac;
  while (temp % 2 == 0) {
    fac.push_back(2);
    temp /= 2;
  }
  for (long long i = 3; i * i <= temp; i += 2) {
    while (temp % i == 0) {
      fac.push_back(i);
      temp /= i;
    }
  }
  if (temp != 1) {
    fac.push_back(temp);
  }
  reverse(fac.begin(), fac.end());
  return fac;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, m, cl, ce, v;
  cin >> n >> m >> cl >> ce >> v;
  vector<long long> ele;
  vector<long long> st;
  for (long long i = 0; i < cl; i++) {
    long long x;
    cin >> x;
    st.push_back(x);
  }
  for (long long i = 0; i < ce; i++) {
    long long x;
    cin >> x;
    ele.push_back(x);
  }
  sort(st.begin(), st.end());
  sort(ele.begin(), ele.end());
  long long q;
  cin >> q;
  while (q--) {
    long long a, b, c, d;
    cin >> a >> b >> c >> d;
    long long indst = lower_bound(st.begin(), st.end(), b) - st.begin();
    long long indel = lower_bound(ele.begin(), ele.end(), b) - ele.begin();
    long long indst2 = indst - 1;
    long long indel2 = indel - 1;
    long long minel = 1e18;
    long long minst = 1e18;
    long long minstair;
    long long minelevator;
    if (indst >= 0 && indst < st.size()) {
      if (abs(b - st[indst]) < minst) {
        minst = abs(b - st[indst]);
        minstair = st[indst];
      }
    }
    if (indst2 >= 0 && indst2 < st.size()) {
      if (abs(b - st[indst2]) < minst) {
        minst = abs(b - st[indst2]);
        minstair = st[indst2];
      }
    }
    if (indel >= 0 && indel < ele.size()) {
      if (abs(b - ele[indel]) < minel) {
        minel = abs(b - ele[indel]);
        minelevator = ele[indel];
      }
    }
    if (indel2 >= 0 && indel2 < ele.size()) {
      if (abs(b - ele[indel2]) < minel) {
        minel = abs(b - ele[indel2]);
        minelevator = ele[indel2];
      }
    }
    long long tupel = ceil((float)(abs(c - a)) / v);
    long long tupst = (abs(c - a));
    long long tsideel = abs(d - minelevator);
    long long tsidest = abs(d - minstair);
    if (c == a)
      cout << abs(d - b);
    else {
      long long ans = min(minst + tupst + tsidest, minel + tupel + tsideel);
      cout << ans;
    }
    cout << "\n";
  }
}
