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;
const long long INF = 1000 * 1000 * 1000;
int main() {
  long long n, m, s, e, v;
  cin >> n >> m >> s >> e >> v;
  vector<int> stairs, elevators;
  long long pos;
  for (long long i = 0; i < s; i++) {
    cin >> pos;
    stairs.push_back(pos);
  }
  for (long long i = 0; i < e; i++) {
    cin >> pos;
    elevators.push_back(pos);
  }
  long long q;
  cin >> q;
  long long x1, x2, y1, y2;
  for (long long i = 0; i < q; i++) {
    cin >> x1 >> y1 >> x2 >> y2;
    if (x1 == x2) {
      cout << abs(y1 - y2) << endl;
    } else {
      long long stair_time = INF;
      long long elevator_time = INF;
      long long l, u;
      pair<vector<int>::iterator, vector<int>::iterator> range;
      if (s) {
        long long closest_stairs;
        range = equal_range(stairs.begin(), stairs.end(), y1);
        l = range.first - stairs.begin();
        u = range.second - stairs.begin();
        if (l >= (long long)stairs.size()) l = 0;
        if (u >= (long long)stairs.size()) u--;
        stair_time =
            min(abs(stairs[l] - y1) + abs(x1 - x2) + abs(stairs[l] - y2),
                abs(stairs[u] - y1) + abs(x1 - x2) + abs(stairs[u] - y2));
      }
      if (e) {
        range = equal_range(elevators.begin(), elevators.end(), y1);
        l = range.first - elevators.begin();
        u = range.second - elevators.begin();
        if (l >= (long long)elevators.size()) l = 0;
        if (u >= (long long)elevators.size()) u--;
        long long vtime = (long long)ceil((double)(abs(x1 - x2)) / (double)v);
        elevator_time =
            min(abs(elevators[u] - y1) + vtime + abs(elevators[u] - y2),
                abs(elevators[l] - y1) + vtime + abs(elevators[l] - y2));
      }
      cout << min(stair_time, elevator_time) << "\n";
    }
  }
  return 0;
}
