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 const sz = 1e5 + 10;
long long const inf = 1e9;
long long s[sz];
long long e[sz];
pair<pair<long long, long long>, pair<long long, long long> > query[sz];
long long res[sz];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, m, cs, ce, v;
  cin >> n >> m >> cs >> ce >> v;
  if (cs != 0) {
    for (int i = 0; i < cs; i++) cin >> s[i];
  }
  if (ce != 0) {
    for (int i = 0; i < ce; i++) cin >> e[i];
  }
  int q;
  cin >> q;
  for (int i = 0; i < q; i++) {
    cin >> query[i].first.first >> query[i].first.second >>
        query[i].second.first >> query[i].second.second;
  }
  for (int i = 0; i < q; i++) {
    long long road1 = inf, road2 = inf;
    pair<long long, long long> sou = query[i].first;
    pair<long long, long long> dis = query[i].second;
    if (cs != 0) {
      long long i = 0, j = cs - 1, lft = s[0], rit = s[cs - 1];
      while (i < j) {
        long long mid = (i + j) / 2;
        if (s[mid] > sou.second) {
          rit = s[mid];
          j = mid - 1;
        } else {
          lft = s[mid];
          i = mid + 1;
        }
      }
      long long road11 = abs(rit - sou.second) + abs(dis.first - sou.first) +
                         abs(rit - dis.second);
      long long road12 = abs(sou.second - lft) + abs(dis.first - sou.first) +
                         abs(lft - dis.second);
      road1 = min(road11, road12);
    }
    if (ce != 0) {
      long long i = 0, j = ce - 1, lft = e[0], rit = e[ce - 1];
      while (i < j) {
        long long mid = (i + j) / 2;
        if (e[mid] > sou.second) {
          rit = e[mid];
          j = mid - 1;
        } else {
          lft = e[mid];
          i = mid + 1;
        }
      }
      long long road21 = abs(rit - sou.second) +
                         abs(dis.first - sou.first) / v +
                         ((abs(dis.first - sou.first) % v > 0) ? 1 : 0) +
                         abs(rit - dis.second);
      long long road22 = abs(sou.second - lft) +
                         abs(dis.first - sou.first) / v +
                         ((abs(dis.first - sou.first) % v > 0) ? 1 : 0) +
                         abs(lft - dis.second);
      road2 = min(road21, road22);
    }
    res[i] = min(road1, road2);
  }
  for (int i = 0; i < q; i++) {
    cout << res[i] << endl;
  }
  return 0;
}
