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 int mod = 1e9 + 7;
template <class T, class U>
inline void add_self(T &a, U b) {
  a += b;
  if (a >= mod) a -= mod;
  if (a < 0) a += mod;
}
template <class T, class U>
inline void min_self(T &x, U y) {
  if (y < x) x = y;
}
template <class T, class U>
inline void max_self(T &x, U y) {
  if (y > x) x = y;
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  cout << t;
  ;
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
template <class T, class U>
void print_m(const map<T, U> &m, int w = 3) {
  if (m.empty()) {
    cout << "Empty" << endl;
    return;
  }
  for (auto x : m) cout << "(" << x.first << ": " << x.second << ")," << endl;
  cout << endl;
}
template <class T, class U>
void debp(const pair<T, U> &pr, bool end_line = 1) {
  cout << "{" << pr.first << " " << pr.second << "}";
  cout << (end_line ? "\n" : ", ");
}
template <class T>
void print_vp(const T &vp, int sep_line = 0) {
  if (vp.empty()) {
    cout << "Empty" << endl;
    return;
  }
  if (!sep_line) cout << "{ ";
  for (auto x : vp) debp(x, sep_line);
  if (!sep_line) cout << "}\n";
  cout << endl;
}
template <typename T>
void print(const T &v, bool show_index = false) {
  int w = 2;
  if (show_index) {
    for (int i = 0; i < int((v).size()); i++) cout << setw(w) << i << " ";
    cout << endl;
  }
  for (auto &el : v) cout << setw(w) << el << " ";
  cout << endl;
}
template <typename T>
void print_vv(const T &vv) {
  if (int((vv).size()) == 0) {
    cout << "Empty" << endl;
    return;
  }
  int w = 3;
  cout << setw(w) << " ";
  for (int j = 0; j < int((*vv.begin()).size()); j++)
    cout << setw(w) << j << " ";
  cout << endl;
  int i = 0;
  for (auto &v : vv) {
    cout << i++ << " {";
    for (auto &el : v) cout << setw(w) << el << " ";
    cout << "},\n";
  }
  cout << endl;
}
const long long inf = 1e18;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m, cs, ce, v, x;
  while (cin >> n >> m >> cs >> ce >> v) {
    set<int> stairs, elevs;
    for (int i = 0; i < int(cs); i++) {
      cin >> x;
      stairs.insert(x);
    }
    for (int i = 0; i < int(ce); i++) {
      cin >> x;
      elevs.insert(x);
    }
    int x1, x2, y1, y2, q;
    cin >> q;
    while (q--) {
      long long ans = inf;
      cin >> x1 >> y1 >> x2 >> y2;
      if (y1 > y2) {
        swap(x1, x2);
        swap(y1, y2);
      }
      long long dist = abs(x1 - x2);
      if (dist == 0) {
        ans = abs(y2 - y1);
      }
      auto lts = stairs.lower_bound(y1);
      if (lts != stairs.begin()) {
        --lts;
        long long cur = y1 - *lts + dist + y2 - *lts;
        min_self(ans, cur);
      }
      auto rts = stairs.upper_bound(y1);
      if (rts != stairs.end()) {
        long long cur = *rts - y1 + dist + abs(y2 - *rts);
        min_self(ans, cur);
      }
      auto lte = elevs.lower_bound(y1);
      if (lte != elevs.begin()) {
        --lte;
        long long cur = y1 - *lte + y2 - *lte;
        cur += (dist + v - 1) / v;
        min_self(ans, cur);
      }
      auto rte = elevs.upper_bound(y1);
      if (rte != elevs.end()) {
        long long cur = *rte - y1 + abs(y2 - *rte);
        cur += (dist + v - 1) / v;
        min_self(ans, cur);
      }
      cout << ans << "\n";
    }
  }
  return 0;
}
