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 int N = 1e6 + 113;
const long long INF = 1e17;
struct pt {
  int x, y;
  pt(int x = 0, int y = 0) : x(x), y(y) {}
};
int n, m, ln, sn, v;
vector<int> lifts, stairs;
long long count_stair(int sy, pt a, pt b) {
  if (sy == -1) {
    return INF;
  }
  long long ans = abs(a.y - sy);
  ans += abs(a.x - b.x);
  ans += abs(b.y - sy);
  return ans;
}
long long count_lift(int ly, pt a, pt b) {
  if (ly == -1) {
    return INF;
  }
  long long ans = abs(a.y - ly);
  ans += (abs(a.x - b.x) + v - 1) / v;
  ans += abs(b.y - ly);
  return ans;
}
int find_after(vector<int>& vec, int y) {
  auto lit = upper_bound(vec.begin(), vec.end(), y);
  if (lit == vec.end()) {
    return -1;
  }
  return *lit;
}
int find_before(vector<int>& vec, int y) {
  auto lit = upper_bound(vec.begin(), vec.end(), y);
  if (lit == vec.begin()) {
    return -1;
  }
  --lit;
  return *lit;
}
int main() {
  cin >> n >> m >> ln >> sn >> v;
  for (int i = 0; i < ln; ++i) {
    int ind;
    cin >> ind;
    stairs.push_back(ind);
  }
  for (int i = 0; i < sn; ++i) {
    int ind;
    cin >> ind;
    lifts.push_back(ind);
  }
  int q;
  cin >> q;
  for (int t = 0; t < q; ++t) {
    pt a, b;
    cin >> a.x >> a.y >> b.x >> b.y;
    if (a.y > b.y) {
      swap(a, b);
    }
    if (a.x == b.x) {
      cout << abs(a.y - b.y) << endl;
      continue;
    }
    long long ans = count_stair(find_after(stairs, a.y), a, b);
    ans = min(ans, count_stair(find_after(stairs, b.y), a, b));
    ans = min(ans, count_stair(find_before(stairs, a.y), a, b));
    ans = min(ans, count_stair(find_before(stairs, b.y), a, b));
    ans = min(ans, count_lift(find_after(lifts, a.y), a, b));
    ans = min(ans, count_lift(find_after(lifts, b.y), a, b));
    ans = min(ans, count_lift(find_before(lifts, a.y), a, b));
    ans = min(ans, count_lift(find_before(lifts, b.y), a, b));
    cout << ans << endl;
  }
}
