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 AbsX(int x) {
  if (0 > x) {
    return -x;
  }
  return x;
}
int n, m, stairCnt, elevatorCnt, v, q;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> m >> stairCnt >> elevatorCnt >> v;
  set<int> stair, elevator;
  for (int i = 1; i <= stairCnt; i++) {
    int cur;
    cin >> cur;
    stair.insert(cur);
  }
  for (int i = 1; i <= elevatorCnt; i++) {
    int cur;
    cin >> cur;
    elevator.insert(cur);
  }
  stair.insert(2e9), stair.insert(0), elevator.insert(2e9), elevator.insert(0);
  cin >> q;
  for (int i = 1; i <= q; i++) {
    int y1, x1, y2, x2, res = 2e9;
    cin >> y1 >> x1 >> y2 >> x2;
    if (y1 == y2) {
      res = AbsX(x1 - x2);
    }
    int value = *(stair.upper_bound(x1));
    if (value != 2e9) {
      int temp = AbsX(x1 - value) + AbsX(y1 - y2) + AbsX(value - x2);
      res = min(res, temp);
    }
    value = *(elevator.upper_bound(x1));
    if (value != 2e9) {
      int temp = AbsX(x1 - value) + AbsX(y1 - y2) / v + AbsX(value - x2);
      if (AbsX(y1 - y2) % v != 0) {
        temp++;
      }
      res = min(res, temp);
    }
    set<int>::iterator it = stair.lower_bound(x1);
    it--;
    value = *(it);
    if (value != 0) {
      int temp = AbsX(x1 - value) + AbsX(y1 - y2) + AbsX(value - x2);
      res = min(res, temp);
    }
    it = elevator.lower_bound(x1);
    it--;
    value = *(it);
    if (value != 0) {
      int temp = AbsX(x1 - value) + AbsX(y1 - y2) / v + AbsX(value - x2);
      if (AbsX(y1 - y2) % v != 0) {
        temp++;
      }
      res = min(res, temp);
    }
    cout << res << endl;
  }
}
