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;
int static fast = []() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  return 0;
}();
int main() {
  long long n, m, st_num, el_num, v, tmp;
  cin >> n >> m >> st_num >> el_num >> v;
  set<long long> stairs;
  set<long long> elevetors;
  for (int i = 0; i < st_num; i++) {
    cin >> tmp;
    stairs.insert(tmp);
  }
  stairs.insert(1e15);
  stairs.insert(-1e15);
  for (int i = 0; i < el_num; i++) {
    cin >> tmp;
    elevetors.insert(tmp);
  }
  elevetors.insert(1e15);
  elevetors.insert(-1e15);
  auto in_mid = [&](long long src, long long dst, set<long long>& s) -> bool {
    if (src > dst) swap(src, dst);
    if (s.lower_bound(src) == s.upper_bound(dst)) return false;
    return true;
  };
  auto nearest = [&](long long src, set<long long>& s) -> int {
    auto nxt = *s.lower_bound(src);
    auto pre = *prev(s.lower_bound(src));
    return min(llabs(nxt - src), llabs(src - pre));
  };
  long long q, x1, y1, x2, y2;
  cin >> q;
  while (q--) {
    cin >> y1 >> x1 >> y2 >> x2;
    long long elv_step = 1 + ((llabs(y1 - y2) - 1) / v);
    if (in_mid(x1, x2, elevetors)) {
      cout << llabs(x1 - x2) + elv_step << "\n";
    } else {
      if (in_mid(x1, x2, stairs)) {
        long long min_dis = min(nearest(x1, elevetors), nearest(x2, elevetors));
        long long maybe_shorter = elv_step + min_dis * 2;
        cout << min(maybe_shorter, llabs(y1 - y2)) + llabs(x1 - x2) << "\n";
      } else {
        long long min_elv_dis =
            min(nearest(x1, elevetors), nearest(x2, elevetors));
        long long min_st_dis = min(nearest(x1, stairs), nearest(x2, stairs));
        long long shorter =
            min(min_st_dis * 2 + llabs(y1 - y2), min_elv_dis * 2 + elv_step);
        cout << shorter + llabs(x1 - x2) << "\n";
      }
    }
  }
  return 0;
}
