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;
void err(istream_iterator<string> it) { cerr << endl; }
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << ": " << a << " ";
  err(++it, args...);
}
const double PI = acos(-1.0);
const int MOD = 1e9 + 7;
const int INF = 2e9;
int n, m, cl, ce, v;
set<int> elevators;
set<int> stairs;
void test() {}
void read() {
  cin >> n >> m >> cl >> ce >> v;
  int stair, elevator;
  for (int i = 0; i < (int)cl; ++i) {
    cin >> stair;
    stairs.insert(stair);
  }
  for (int i = 0; i < (int)ce; ++i) {
    cin >> elevator;
    elevators.insert(elevator);
  }
}
pair<int, int> findNearest(int b, set<int>& candidates) {
  pair<int, int> nearest = {-1, -1};
  auto it1 = candidates.lower_bound(b);
  if (it1 != candidates.end()) nearest.first = *it1;
  it1 = candidates.lower_bound(b);
  if (it1 != candidates.begin()) {
    --it1;
    nearest.second = *it1;
  }
  return nearest;
}
void solve() {
  int q;
  cin >> q;
  while (q--) {
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    if (a == c) {
      cout << abs(d - b) << endl;
      continue;
    }
    if (a * m + b > c * m + d) {
      swap(a, c);
      swap(b, d);
    }
    int all_elevator = 1e9;
    int all_stair = 1e9;
    pair<int, int> nearest_elevator = findNearest(b, elevators);
    pair<int, int> nearest_stair = findNearest(b, stairs);
    if (nearest_elevator.first != -1)
      all_elevator = min(all_elevator, abs(b - nearest_elevator.first) +
                                           abs(nearest_elevator.first - d) +
                                           (int)ceil(abs(c - a) / (double)v));
    if (nearest_stair.first != -1)
      all_stair =
          min(all_stair, abs(b - nearest_stair.first) +
                             abs(nearest_stair.first - d) + (abs(c - a) / 1));
    if (nearest_elevator.second != -1)
      all_elevator = min(all_elevator, abs(b - nearest_elevator.second) +
                                           abs(nearest_elevator.second - d) +
                                           (int)ceil(abs(c - a) / (double)v));
    if (nearest_stair.second != -1)
      all_stair =
          min(all_stair, abs(b - nearest_stair.second) +
                             abs(nearest_stair.second - d) + abs(c - a));
    cout << min(all_elevator, all_stair) << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  test();
  int TC = 1;
  for (int tc = (int)1; tc <= (int)TC; ++tc) {
    read();
    solve();
  }
  return 0;
}
