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 mod = 1000000009;
const long long INF = 1000000010;
const long long LONGINF = 4e18;
const double PI = 3.141592653589793;
int getNext(set<int>& s, int x) {
  auto it = s.lower_bound(x);
  if (it == s.end()) return -1;
  return *it;
}
int getPrev(set<int>& s, int x) {
  auto it = s.upper_bound(x);
  if (it == s.begin()) return -1;
  return *(prev(it));
}
void solve() {
  int n, m;
  int cs, ce;
  int v;
  cin >> n >> m >> cs >> ce >> v;
  set<int> stairs, lifts;
  for (int i = 0; i < cs; ++i) {
    int a;
    cin >> a;
    stairs.insert(a);
  }
  for (int i = 0; i < ce; ++i) {
    int a;
    cin >> a;
    lifts.insert(a);
  }
  int q;
  cin >> q;
  for (int i = 0; i < q; ++i) {
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    int ans = INF;
    int nl, pl, ns, ps;
    int h = abs(c - a);
    nl = getNext(lifts, b);
    pl = getPrev(lifts, b);
    ns = getNext(stairs, b);
    ps = getPrev(stairs, b);
    if (nl != -1) {
      ans = min(ans, abs(nl - b) + (h + v - 1) / v + abs(nl - d));
    }
    if (pl != -1) {
      ans = min(ans, abs(pl - b) + (h + v - 1) / v + abs(pl - d));
    }
    if (ns != -1) {
      ans = min(ans, abs(ns - b) + h + abs(ns - d));
    }
    if (ps != -1) {
      ans = min(ans, abs(ps - b) + h + abs(ps - d));
    }
    if (h == 0) ans = abs(b - d);
    cout << ans << endl;
  }
}
void init() {}
int main() {
  iostream::sync_with_stdio(false);
  cin.tie(0);
  cout << setprecision(20) << fixed;
  init();
  solve();
  return 0;
}
