#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
void yes() {
  cout << "Yes"
       << "\n";
}
void no() {
  cout << "No"
       << "\n";
}
struct Sync_stdio {
  Sync_stdio() {
    cin.tie(NULL);
    ios_base::sync_with_stdio(false);
  }
} _sync_stdio;
struct FAIL {
  FAIL() {
    cout << "CHANGE!!!"
         << "\n";
  }
};
enum { LEST, ELEV };
long long calc(long long y1, long long y2, long long h, long long pos,
               long long type, long long v) {
  long long res = abs(y1 - pos) + abs(y2 - pos);
  if (type == LEST) {
    res += h;
  } else {
    res += (h + v - 1) / v;
  }
  return res;
}
int main() {
  long long n, m, c_l, c_e, v;
  cin >> n >> m >> c_l >> c_e >> v;
  vector<long long> l(c_l);
  for (int __i = 0; __i < (c_l); ++__i) cin >> l[__i];
  ;
  vector<long long> e(c_e);
  for (int __i = 0; __i < (c_e); ++__i) cin >> e[__i];
  ;
  int q;
  cin >> q;
  for (int i = (0); i < (q); ++i) {
    long long x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    long long h = abs(x2 - x1);
    if (y1 > y2) {
      swap(y1, y2);
    }
    if (h == 0) {
      cout << abs(y1 - y2) << "\n";
      continue;
    }
    long long ans = LLONG_MAX;
    int pos1_l = lower_bound(l.begin(), l.end(), y1) - l.begin();
    int pos2_l = upper_bound(l.begin(), l.end(), y2) - 1 - l.begin();
    int pos1_e = lower_bound(e.begin(), e.end(), y1) - e.begin();
    int pos2_e = upper_bound(e.begin(), e.end(), y2) - 1 - e.begin();
    if (0 <= pos1_l && pos1_l < l.size()) {
      ans = min(ans, calc(y1, y2, h, l[pos1_l], LEST, v));
    }
    if (0 <= pos2_l && pos2_l < l.size()) {
      ans = min(ans, calc(y1, y2, h, l[pos2_l], LEST, v));
    }
    if (0 <= pos1_e && pos1_e < e.size()) {
      ans = min(ans, calc(y1, y2, h, e[pos1_e], ELEV, v));
    }
    if (0 <= pos2_e && pos2_e < e.size()) {
      ans = min(ans, calc(y1, y2, h, e[pos2_e], ELEV, v));
    }
    cout << ans << "\n";
  }
}
