#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
long long n, m, s, e, v, a[100005], b[100005], q, x, xx, y, yy;
long long bs1(long long low, long long high, long long arr[]) {
  long long tmp = -1, mid;
  while (low <= high) {
    mid = low + (high - low) / 2;
    if (arr[mid] < y)
      tmp = arr[mid], low = mid + 1;
    else
      high = mid - 1;
  }
  return tmp;
}
long long bs2(long long low, long long high, long long arr[]) {
  long long tmp = -1, mid;
  while (low <= high) {
    mid = low + (high - low) / 2;
    if (arr[mid] > y)
      tmp = arr[mid], high = mid - 1;
    else
      low = mid + 1;
  }
  return tmp;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> s >> e >> v;
  if (s)
    for (int i = 0; i < s; i++) cin >> a[i];
  if (e)
    for (int i = 0; i < e; i++) cin >> b[i];
  cin >> q;
  while (q--) {
    cin >> x >> y >> xx >> yy;
    if (x == xx) {
      cout << abs(y - yy) << '\n';
      continue;
    }
    long long ans = 1e9;
    long long tmp = bs1(0, s - 1, a);
    if (~tmp) ans = y - tmp + abs(xx - x) + abs(tmp - yy);
    tmp = bs2(0, s - 1, a);
    if (~tmp) ans = min(ans, tmp - y + abs(xx - x) + abs(tmp - yy));
    tmp = bs1(0, e - 1, b);
    if (~tmp)
      ans = min(ans, y - tmp + (abs(xx - x) / v + (abs(xx - x) % v > 0)) +
                         abs(tmp - yy));
    tmp = bs2(0, e - 1, b);
    if (~tmp)
      ans = min(ans, tmp - y + (abs(xx - x) / v + (abs(xx - x) % v > 0)) +
                         abs(tmp - yy));
    cout << ans << '\n';
  }
  return 0;
}
