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 double PI = 3.14159265358979323846264338327950288;
const long long INFLL = 0x3f3f3f3f3f3f3f3f;
const int INF = 0x3f3f3f3f;
int n, m, cl, ce, v, q;
vector<int> l, e;
int bin(int x, vector<int> A) {
  int pos = lower_bound(A.begin(), A.end(), x) - A.begin();
  if (pos == A.size())
    return A.back();
  else if (pos == 0)
    return A[0];
  else {
    if (abs(A[pos] - x) > abs(A[pos - 1] - x))
      return A[pos - 1];
    else
      return A[pos];
  }
}
void Init() {
  scanf("%d%d%d%d%d", &n, &m, &cl, &ce, &v);
  l.resize(cl);
  e.resize(ce);
  for (register int i = (0); i < (cl); i++) {
    scanf("%d", &l[i]);
  }
  for (register int i = (0); i < (ce); i++) {
    scanf("%d", &e[i]);
  }
  scanf("%d", &q);
}
int main() {
  Init();
  while (q--) {
    int x1, x2, y1, y2;
    scanf("%d%d%d%d", &y1, &x1, &y2, &x2);
    if (x1 > x2) swap(x1, x2);
    if (y1 > y2) swap(y1, y2);
    int ans = INF;
    if (!l.empty()) {
      int pos = bin(x1, l);
      ans = min(ans, abs(x1 - pos) + abs(x2 - pos) + (y2 - y1));
    }
    if (!e.empty()) {
      int pos = bin(x1, e);
      ans = min(ans,
                abs(x1 - pos) + abs(x2 - pos) + (int)ceil(1.0 * (y2 - y1) / v));
    }
    cout << ans << endl;
  }
  return 0;
}
