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;
template <typename T>
T gcd(T a, T b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
vector<long long> b_v;
void bin(unsigned long long n) {
  if (n > 1) bin(n >> 1);
  b_v.emplace_back(n & 1);
}
long long isPowerof2(long long x) { return (x && !(x & x - 1)); }
long long n, m, second, e, v;
vector<long long> spos, epos;
long long smin(long long x1, long long y1, long long x2, long long y2) {
  long long right, left;
  long long rind =
      lower_bound(spos.begin(), spos.end(), max(y1, y2)) - spos.begin();
  if (rind == spos.size()) {
    right = INT_MAX;
  } else {
    long long val = *lower_bound(spos.begin(), spos.end(), max(y1, y2));
    right = abs(x1 - x2) + abs(val - y1) + abs(val - y2);
  }
  if (rind == 0) {
    left = INT_MAX;
  } else {
    long long val = *(lower_bound(spos.begin(), spos.end(), max(y1, y2)) - 1);
    left = abs(x1 - x2) + abs(val - y1) + abs(val - y2);
  }
  long long ans1 = min(left, right);
  return ans1;
}
long long emin(long long x1, long long y1, long long x2, long long y2) {
  long long right, left;
  long long rind =
      lower_bound(epos.begin(), epos.end(), max(y1, y2)) - epos.begin();
  if (rind == epos.size()) {
    right = INT_MAX;
  } else {
    long long val = *lower_bound(epos.begin(), epos.end(), max(y1, y2));
    right =
        ceil((double)(abs(x1 - x2) * 1.0) / v) + abs(val - y1) + abs(val - y2);
  }
  if (rind == 0) {
    left = INT_MAX;
  } else {
    long long val = *(lower_bound(epos.begin(), epos.end(), max(y1, y2)) - 1);
    left =
        ceil((double)(abs(x1 - x2) * 1.0) / v) + abs(val - y1) + abs(val - y2);
  }
  long long ans1 = min(left, right);
  return ans1;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ostream_iterator<long long> output(cout, " ");
  cin >> n >> m >> second >> e >> v;
  for (long long(i) = (0); i < (second); i++) {
    long long xx;
    cin >> xx;
    spos.emplace_back(xx);
  }
  for (long long(i) = (0); i < (e); i++) {
    long long yy;
    cin >> yy;
    epos.emplace_back(yy);
  }
  long long q;
  cin >> q;
  while (q--) {
    long long x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    cout << min(smin(x1, y1, x2, y2), emin(x1, y1, x2, y2)) << '\n';
  }
  return 0;
}
