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, cl, ce, v;
vector<long long> cl_vec, ce_vec;
void solve();
int main() {
  cin >> n >> m >> cl >> ce >> v;
  cl_vec.clear();
  ce_vec.clear();
  if (cl) {
    for (long long i = 0; i < cl; i++) {
      long long x;
      cin >> x;
      cl_vec.push_back(x);
    }
    sort(cl_vec.begin(), cl_vec.end());
  }
  if (ce) {
    for (long long i = 0; i < ce; i++) {
      long long x;
      cin >> x;
      ce_vec.push_back(x);
    }
    sort(ce_vec.begin(), ce_vec.end());
  }
  long long q;
  cin >> q;
  while (q--) solve();
  return 0;
}
void solve() {
  long long x1, y1, x2, y2;
  cin >> y1 >> x1 >> y2 >> x2;
  long long ans1 = (long long)(1e16), ans2 = (long long)(1e16),
            ans3 = (long long)(1e16), ans4 = (long long)(1e16);
  if (cl) {
    long long minval = (long long)(1e16);
    long long nearest_stair_coordinate_l = (long long)(1e16),
              nearest_stair_coordinate_r = (long long)(1e16);
    vector<long long>::iterator lower;
    lower = lower_bound(cl_vec.begin(), cl_vec.end(), y1);
    if (lower - cl_vec.end() == 0) {
      nearest_stair_coordinate_r = (long long)(1e16);
      nearest_stair_coordinate_l = cl_vec[cl_vec.size() - 1];
    } else {
      long long indx = lower - cl_vec.begin();
      nearest_stair_coordinate_r = cl_vec[indx];
      if (indx == 0) {
        nearest_stair_coordinate_l = (long long)(1e16);
      } else
        nearest_stair_coordinate_l = cl_vec[indx - 1];
    }
    ans1 = abs(x1 - nearest_stair_coordinate_l);
    ans1 += abs(y2 - y1);
    ans1 += abs(x2 - nearest_stair_coordinate_l);
    ans3 = abs(x1 - nearest_stair_coordinate_r);
    ans3 += abs(y2 - y1);
    ans3 += abs(x2 - nearest_stair_coordinate_r);
  }
  if (ce) {
    long long minval = (long long)(1e16);
    long long nearest_elevator_coordinate_l = (long long)(1e16),
              nearest_elevator_coordinate_r = (long long)(1e16);
    vector<long long>::iterator lower;
    lower = lower_bound(ce_vec.begin(), ce_vec.end(), y1);
    if (lower - ce_vec.end() == 0) {
      nearest_elevator_coordinate_r = (long long)(1e16);
      nearest_elevator_coordinate_l = ce_vec[ce_vec.size() - 1];
    } else {
      long long indx = lower - ce_vec.begin();
      nearest_elevator_coordinate_r = ce_vec[indx];
      if (indx == 0) {
        nearest_elevator_coordinate_l = (long long)(1e16);
      } else
        nearest_elevator_coordinate_l = ce_vec[indx - 1];
    }
    double temp = abs(y2 - y1) / (double)v;
    temp = ceil(temp);
    ans2 = abs(x1 - nearest_elevator_coordinate_l);
    ans2 += (long long)temp;
    ans2 += abs(x2 - nearest_elevator_coordinate_l);
    ans4 = abs(x1 - nearest_elevator_coordinate_r);
    ans4 += (long long)temp;
    ans4 += abs(x2 - nearest_elevator_coordinate_r);
  }
  cout << min(min(ans1, ans2), min(ans3, ans4)) << endl;
}
