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 n, m, c1, c2, v, q;
vector<long long int> str, ele;
void input() {
  cin >> n >> m >> c1 >> c2 >> v;
  str.resize(c1), ele.resize(c2);
  if (((long long int)(str).size()))
    for (auto &it : str) cin >> it;
  if (((long long int)(ele).size()))
    for (auto &it : ele) cin >> it;
  cin >> q;
}
bool chkbtw(long long x1, long long x2) {
  long long l = 0, r = ((long long int)(str).size()) - 1;
  while (l <= r) {
    long long mid = l + (r - l) / 2;
    if (str[mid] >= x1 and str[mid] <= x2)
      return true;
    else if (str[mid] >= x1)
      r = mid - 1;
    else
      l = mid + 1;
  }
  return false;
}
bool chkbtw2(long long x1, long long x2) {
  long long l = 0, r = ((long long int)(ele).size()) - 1;
  while (l <= r) {
    long long mid = l + (r - l) / 2;
    if (ele[mid] >= x1 and ele[mid] <= x2)
      return true;
    else if (ele[mid] >= x1)
      r = mid - 1;
    else
      l = mid + 1;
  }
  return false;
}
void solve() {
  while (q--) {
    long long i1, j1, i2, j2;
    cin >> j1 >> i1 >> j2 >> i2;
    long long ans = 1e18, t1 = 1e18, t2 = 1e18, t3 = 1e18, t4 = 1e18, t5 = 1e18,
              t6 = 1e18, t7 = 1e18;
    long long x1 = min(i1, i2), x2 = max(i1, i2);
    if (((long long int)(str).size())) {
      if (chkbtw(x1, x2))
        t3 = abs(i1 - i2) + abs(j1 - j2);
      else {
        auto it = upper_bound(str.begin(), str.end(), x1),
             jt = lower_bound(str.begin(), str.end(), x2);
        if (it != str.begin()) {
          it--;
          t1 = abs(i1 - i2) + abs(j1 - j2) + 2 * abs(x1 - *it);
        }
        if (jt != str.end())
          t2 = abs(i1 - i2) + abs(j1 - j2) + 2 * abs(x2 - *jt);
      }
    }
    if (((long long int)(ele).size())) {
      if (chkbtw2(x1, x2))
        t4 = abs(i1 - i2) + (abs(j1 - j2) + v - 1) / v;
      else {
        auto it = upper_bound(ele.begin(), ele.end(), x1),
             jt = lower_bound(ele.begin(), ele.end(), x2);
        if (it != str.begin()) {
          it--;
          t5 = abs(i1 - i2) + (abs(j1 - j2) + v - 1) / v + 2 * abs(x1 - *it);
        }
        if (jt != str.end())
          t6 = abs(i1 - i2) + (abs(j1 - j2) + v - 1) / v + 2 * abs(x2 - *jt);
      }
    }
    if (j1 == j2) t7 = abs(i1 - i2) + abs(j1 - j2);
    ans = min({t1, t2, t3, t4, t5, t6, t7});
    cout << ans << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.precision(20);
  long long t = 1;
  while (t--) {
    input();
    solve();
    cout << endl;
  }
  cin.get();
  return 0;
}
