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 long long MOD = 1e9 + 7;
const long double PI = 4 * atan((long double)1);
const long long INF = 1e18;
const long long NINF = -1e18;
long long get_hash(string s) {
  long long N = 1000001;
  long long base[N], A = 11, MD = 1110111110111;
  base[0] = 1;
  for (long long i = (1); i < (N); ++i) base[i] = (base[i - 1] * A) % MD;
  long long hs = 0;
  for (long long i = (0); i < (s.size()); ++i) {
    hs += (s[i] * base[i]);
    hs %= MD;
  }
  return hs;
}
long long power(long long a, long long n) {
  long long res = 1;
  while (n) {
    if (n % 2) res *= a;
    a *= a;
    n /= 2;
  }
  return res;
}
vector<string> vec_splitter(string s) {
  s += ',';
  vector<string> res;
  while (!s.empty()) {
    res.push_back(s.substr(0, s.find(',')));
    s = s.substr(s.find(',') + 1);
  }
  return res;
}
void debug_out(vector<string> __attribute__((unused)) args,
               __attribute__((unused)) long long idx,
               __attribute__((unused)) long long LINE_NUM) {
  cerr << endl;
}
template <typename Head, typename... Tail>
void debug_out(vector<string> args, long long idx, long long LINE_NUM, Head H,
               Tail... T) {
  if (idx > 0)
    cerr << ", ";
  else
    cerr << "Line(" << LINE_NUM << ") ";
  stringstream ss;
  ss << H;
  cerr << args[idx] << " = " << ss.str();
  debug_out(args, idx + 1, LINE_NUM, T...);
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, m, cl, ce, v;
  cin >> n >> m >> cl >> ce >> v;
  vector<long long> a(cl), b(ce);
  for (long long i = (0); i < (cl); ++i) cin >> a[i];
  for (long long i = (0); i < (ce); ++i) cin >> b[i];
  if (cl != 0) sort(a.begin(), a.end());
  if (ce != 0) sort(b.begin(), b.end());
  long long q;
  cin >> q;
  while (q--) {
    long long x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    long long mini = INF;
    if (cl != 0) {
      long long ind = lower_bound(a.begin(), a.end(), y1) - a.begin();
      if (ind != cl) {
        long long x = abs(a[ind] - y1);
        x += abs(x2 - x1);
        x += abs(y2 - a[ind]);
        if (x < mini) mini = x;
      }
      if (ind != 0) {
        ind--;
        long long x = abs(y1 - a[ind]);
        x += abs(x2 - x1);
        x += abs(y2 - a[ind]);
        if (x < mini) mini = x;
      }
    }
    if (ce != 0) {
      long long ind2 = lower_bound(b.begin(), b.end(), y1) - b.begin();
      if (ind2 != ce) {
        long long x = abs(b[ind2] - y1);
        long long p = abs(x2 - x1);
        x += ceil((float)p / v);
        x += abs(y2 - b[ind2]);
        if (x < mini) mini = x;
      }
      if (ind2 != 0) {
        ind2--;
        long long x = abs(y1 - b[ind2]);
        long long p = abs(x2 - x1);
        x += ceil((float)p / v);
        x += abs(y2 - b[ind2]);
        if (x < mini) mini = x;
      }
    }
    cout << mini << "\n";
  }
  return 0;
}
