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>
#pragma GCC optimize("O3")
using namespace std;
long long n, m, s, e, v, a[100005], b[100005], q, x, xx, y, yy;
long long bs1(long long low, long long high, long long arr[]) {
  long long tmp = -1, mid;
  while (low <= high) {
    mid = low + (high - low) / 2;
    if (arr[mid] < y)
      tmp = arr[mid], low = mid + 1;
    else
      high = mid - 1;
  }
  return tmp;
}
long long bs2(long long low, long long high, long long arr[]) {
  long long tmp = -1, mid;
  while (low <= high) {
    mid = low + (high - low) / 2;
    if (arr[mid] > y)
      tmp = arr[mid], high = mid - 1;
    else
      low = mid + 1;
  }
  return tmp;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> s >> e >> v;
  if (s)
    for (int i = 0; i < s; i++) cin >> a[i];
  if (e)
    for (int i = 0; i < e; i++) cin >> b[i];
  cin >> q;
  while (q--) {
    cin >> x >> y >> xx >> yy;
    if (x == xx) {
      cout << abs(y - yy) << '\n';
      continue;
    }
    long long ans = 1e9;
    long long tmp = bs1(0, s - 1, a);
    if (~tmp) ans = y - tmp + abs(xx - x) + abs(tmp - yy);
    tmp = bs2(0, s - 1, a);
    if (~tmp) ans = min(ans, tmp - y + abs(xx - x) + abs(tmp - yy));
    tmp = bs1(0, e - 1, b);
    if (~tmp)
      ans = min(ans, y - tmp + (abs(xx - x) / v + (abs(xx - x) % v > 0)) +
                         abs(tmp - yy));
    tmp = bs2(0, e - 1, b);
    if (~tmp)
      ans = min(ans, tmp - y + (abs(xx - x) / v + (abs(xx - x) % v > 0)) +
                         abs(tmp - yy));
    cout << ans << '\n';
  }
  return 0;
}
