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;
long long int n, m, ns, ne, v, q;
vector<long long int> stairs;
vector<long long int> lifts;
long long int x2, x3, y2, y3;
string s;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> m >> ns >> ne >> v;
  if (ns > 0) {
    for (int i = 0; i < ns; i++) {
      long long int x;
      cin >> x;
      stairs.push_back(x);
    }
  } else {
    getline(cin, s);
    getline(cin, s);
  }
  if (ne > 0) {
    for (int i = 0; i < ne; i++) {
      long long int x;
      cin >> x;
      lifts.push_back(x);
    }
  } else {
    getline(cin, s);
    getline(cin, s);
  }
  cin >> q;
  for (int i = 0; i < q; i++) {
    cin >> x2 >> y2 >> x3 >> y3;
    if (y2 > x3) {
      swap(x2, x3);
      swap(y2, y3);
    }
    if (x2 == x3) {
      cout << abs(y3 - y2) << endl;
      continue;
    }
    long long int cmp1 = 1e9, cmp2 = 1e9, cmp3 = 1e9, cmp4 = 1e9;
    if (ne > 0) {
      auto it1 = lower_bound(lifts.begin(), lifts.end(), y2);
      if (it1 != lifts.end())
        cmp1 = abs(*it1 - y2) + abs(*it1 - y3) +
               ceil((double)(abs(x3 - x2)) / (double)v);
      if (it1 == lifts.end()) {
        auto it = lifts.rbegin();
        cmp2 = abs(*it - y2) + abs(*it - y3) +
               ceil((double)abs(x3 - x2) / (double)v);
      } else if (it1 != lifts.begin()) {
        it1--;
        cmp2 = abs(*it1 - y2) + abs(*it1 - y3) +
               ceil((double)abs(x3 - x2) / (double)v);
      }
    }
    if (ns > 0) {
      auto it2 = lower_bound(stairs.begin(), stairs.end(), y2);
      if (it2 != stairs.end())
        cmp3 = abs(*it2 - y2) + abs(*it2 - y3) + ceil((double)abs(x3 - x2));
      if (it2 == stairs.end()) {
        auto it = stairs.rbegin();
        cmp4 = abs(*it - y2) + abs(*it - y3) + ceil((double)abs(x3 - x2));
      } else if (it2 != stairs.begin()) {
        it2--;
        cmp4 = abs(*it2 - y2) + abs(*it2 - y3) + ceil((double)abs(x3 - x2));
      }
    }
    cout << min(cmp1, min(cmp2, min(cmp3, cmp4))) << endl;
  }
  return 0;
}
