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>
#pragma GCC optimize("O3")
#pragma loop_opt(on)
using namespace std;
template <class T>
using vec = vector<T>;
template <class T>
using stack = stack<T, vec<T> >;
template <class T>
using MaxHeap = priority_queue<T, vec<T>, less<T> >;
template <class T>
using MinHeap = priority_queue<T, vec<T>, greater<T> >;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m, l, e, v, q, x, y, X, Y, ans, in;
  cin >> n >> m >> l >> e >> v;
  set<int> stop;
  vec<int> data, L, E;
  for (int i = 0; i < l; i++) {
    cin >> in;
    stop.insert(in);
    stop.insert(-in);
  }
  for (auto &i : stop) L.push_back(i);
  stop.clear();
  for (int i = 0; i < e; i++) {
    cin >> in;
    stop.insert(in);
    stop.insert(-in);
  }
  for (auto &i : stop) E.push_back(i);
  cin >> q;
  while (q--) {
    cin >> y >> x >> Y >> X;
    Y = abs(Y - y);
    ans = 0x3f3f3f3f;
    data.clear();
    data.push_back(lower_bound(E.begin(), E.end(), x) - E.begin());
    data.push_back(lower_bound(E.begin(), E.end(), -x) - E.begin());
    data.push_back(lower_bound(E.begin(), E.end(), X) - E.begin());
    data.push_back(lower_bound(E.begin(), E.end(), -X) - E.begin());
    for (auto &i : data) {
      if (i < 0 || i >= (int)E.size()) continue;
      ans = min(abs(x - abs(E[i])) + abs(X - abs(E[i])) + int(Y / v) +
                    (Y % v ? 1 : 0),
                ans);
    }
    data.clear();
    data.push_back(lower_bound(L.begin(), L.end(), x) - L.begin());
    data.push_back(lower_bound(L.begin(), L.end(), -x) - L.begin());
    data.push_back(lower_bound(L.begin(), L.end(), X) - L.begin());
    data.push_back(lower_bound(L.begin(), L.end(), -X) - L.begin());
    for (auto &i : data) {
      if (i < 0 || i >= (int)L.size()) continue;
      ans = min(abs(x - abs(L[i])) + abs(X - abs(L[i])) + Y, ans);
    }
    cout << ans << '\n';
  }
}
