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 double PI = acos(-1.0);
const double EPS = 1e-9;
const int MOD = 1e9 + 9;
const int INF = 1e9 + 10000;
const long long INFLL = 4e18;
const int dr[] = {-1, 0, 1, 0, -1, 1, 1, -1};
const int dc[] = {0, 1, 0, -1, 1, 1, -1, -1};
long long power(long long x, int y) {
  if (y == 0) return 1LL;
  long long ret = power(x, y / 2);
  ret = (ret * ret) % MOD;
  if (y & 1) ret = (ret * x) % MOD;
  return ret;
}
set<int> elev;
set<int> stair;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m, st, el, v;
  scanf("%d %d %d %d %d", &n, &m, &st, &el, &v);
  for (int i = 0; i < st; i++) {
    int x;
    scanf("%d", &x);
    stair.insert(x);
  }
  for (int i = 0; i < el; i++) {
    int x;
    scanf("%d", &x);
    elev.insert(x);
  }
  int q;
  scanf("%d", &q);
  while (q--) {
    int x1, y1, x2, y2;
    scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
    if (x1 == x2) {
      printf("%d\n", abs(y1 - y2));
      continue;
    }
    int clost;
    set<int>::iterator it;
    int op1 = 2e9;
    if (stair.size() > 0) {
      it = stair.lower_bound(y1);
      if (it == stair.end()) {
        --it;
        op1 = abs(y1 - *it) + abs(x1 - x2) + abs(*it - y2);
      } else if (it == stair.begin()) {
        op1 = abs(y1 - *it) + abs(x1 - x2) + abs(*it - y2);
      } else {
        int tmp1 = abs(y1 - *it) + abs(x1 - x2) + abs(*it - y2);
        --it;
        int tmp2 = abs(y1 - *it) + abs(x1 - x2) + abs(*it - y2);
        op1 = min(tmp1, tmp2);
      }
    }
    int op2 = 2e9;
    if (elev.size() > 0) {
      int naik = (int)(ceil((double)(abs(x1 - x2)) / (double)v));
      it = elev.lower_bound(y1);
      if (it == elev.end()) {
        --it;
        op2 = abs(y1 - *it) + naik + abs(*it - y2);
      } else if (it == elev.begin()) {
        op2 = abs(y1 - *it) + naik + abs(*it - y2);
      } else {
        int tmp1 = abs(y1 - *it) + naik + abs(*it - y2);
        --it;
        int tmp2 = abs(y1 - *it) + naik + abs(*it - y2);
        op2 = min(tmp1, tmp2);
      }
    }
    int ans = min(op1, op2);
    printf("%d\n", ans);
  }
  return 0;
}
