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;
constexpr int inf{1000000009};
int n, m;
int cl, cr;
vector<int> l, r;
int v;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m;
  cin >> cl >> cr;
  l.resize(cl);
  r.resize(cr);
  cin >> v;
  for (int& x : l) cin >> x;
  for (int& x : r) cin >> x;
  int q;
  cin >> q;
  while (q--) {
    int x, y, xx, yy;
    cin >> y >> x >> yy >> xx;
    auto l1 = lower_bound(l.begin(), l.end(), x);
    auto l2 = l1;
    int ans{inf};
    for (int i = 0; i < 3; ++i) {
      if (l1 != l.end())
        ans = min(ans, abs((*l1) - x) + abs(y - yy) + abs((*l1) - xx));
      if (l2 != l.end()) {
        ans = min(ans, abs((*l2) - x) + abs(y - yy) + abs((*l2) - xx));
        l2++;
      }
      if (l1 != l.begin()) {
        l1--;
      }
    }
    auto ll1 = lower_bound(l.begin(), l.end(), xx);
    auto ll2 = ll1;
    for (int i = 0; i < 3; ++i) {
      if (ll1 != l.end())
        ans = min(ans, abs((*ll1) - x) + abs(y - yy) + abs((*ll1) - xx));
      if (ll2 != l.end()) {
        ans = min(ans, abs((*ll2) - x) + abs(y - yy) + abs((*ll2) - xx));
        ll2++;
      }
      if (ll1 != l.begin()) {
        ll1--;
      }
    }
    auto r1 = lower_bound(r.begin(), r.end(), x);
    auto r2 = r1;
    for (int i = 0; i < 3; ++i) {
      if (r1 != r.end())
        ans = min(ans,
                  abs((*r1) - x) + (abs(y - yy) + v - 1) / v + abs((*r1) - xx));
      if (r2 != r.end()) {
        ans = min(ans,
                  abs((*r2) - x) + (abs(y - yy) + v - 1) / v + abs((*r2) - xx));
        r2++;
      }
      if (r1 != r.begin()) {
        r1--;
      }
    }
    auto rr1 = lower_bound(r.begin(), r.end(), x);
    auto rr2 = rr1;
    for (int i = 0; i < 3; ++i) {
      if (rr1 != r.end())
        ans = min(ans, abs((*rr1) - x) + (abs(y - yy) + v - 1) / v +
                           abs((*rr1) - xx));
      if (rr2 != r.end()) {
        ans = min(ans, abs((*rr2) - x) + (abs(y - yy) + v - 1) / v +
                           abs((*rr2) - xx));
        rr2++;
      }
      if (rr1 != r.begin()) {
        rr1--;
      }
    }
    if (y == yy) {
      ans = min(ans, abs(x - xx));
    }
    cout << ans << endl;
  }
  return 0;
}
