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;
long long N, M, S, E, V;
vector<long long> stairs;
vector<long long> elevators;
long long menorelevator(long long x, long long y, long long xf, long long yf) {
  long long m =
      lower_bound(elevators.begin(), elevators.end(), y) - elevators.begin();
  long long c;
  if (m == 0) return 1001001001001001;
  m = elevators[m - 1];
  c = abs(y - m) + (abs(x - xf) + V - 1) / V + abs(yf - m);
  return c;
}
long long maiorelevator(long long x, long long y, long long xf, long long yf) {
  long long m =
      lower_bound(elevators.begin(), elevators.end(), y) - elevators.begin();
  long long c;
  if (m == E) return 1001001001001001;
  m = elevators[m];
  c = abs(y - m) + (abs(x - xf) + V - 1) / V + abs(yf - m);
  return c;
}
long long menorstair(long long x, long long y, long long xf, long long yf) {
  long long m = lower_bound(stairs.begin(), stairs.end(), y) - stairs.begin();
  long long c;
  if (m == 0) return 1001001001001001;
  m = stairs[m - 1];
  c = abs(y - m) + abs(x - xf) + abs(yf - m);
  return c;
}
long long maiorstair(long long x, long long y, long long xf, long long yf) {
  long long m = lower_bound(stairs.begin(), stairs.end(), y) - stairs.begin();
  long long c;
  if (m == S) return 1001001001001001;
  m = stairs[m];
  c = abs(y - m) + abs(x - xf) + abs(yf - m);
  return c;
}
int main() {
  int Q;
  long long x, y, xf, yf;
  long long r;
  scanf("%I64d %I64d %I64d %I64d %I64d", &N, &M, &S, &E, &V);
  for (int i = 0; i < S; i++) {
    scanf("%I64d", &x);
    stairs.push_back(x);
  }
  for (int i = 0; i < E; i++) {
    scanf("%I64d", &x);
    elevators.push_back(x);
  }
  scanf("%d", &Q);
  while (Q--) {
    scanf("%I64d %I64d %I64d %I64d", &x, &y, &xf, &yf);
    if (x == xf)
      printf("%I64d\n", abs(y - yf));
    else {
      r = maiorelevator(x, y, xf, yf);
      r = min(r, menorelevator(x, y, xf, yf));
      r = min(r, maiorstair(x, y, xf, yf));
      r = min(r, menorstair(x, y, xf, yf));
      swap(x, xf);
      swap(y, yf);
      r = min(r, maiorelevator(x, y, xf, yf));
      r = min(r, menorelevator(x, y, xf, yf));
      r = min(r, maiorstair(x, y, xf, yf));
      r = min(r, menorstair(x, y, xf, yf));
      printf("%I64d\n", r);
    }
  }
  return 0;
}
