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;
void read(vector<long long> &v) {
  for (int i = 0; i < v.size(); i++) cin >> v[i];
}
void print(vector<long long> v) {
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
}
long long n, m, a, b, temp;
string str;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, m;
  cin >> n >> m;
  long long s, e;
  cin >> s >> e;
  long long v;
  cin >> v;
  vector<long long> stairs(s);
  read(stairs);
  vector<long long> ele(e);
  read(ele);
  int q;
  cin >> q;
  long long c, d;
  long long ans;
  long long distance;
  while (q--) {
    cin >> a >> b >> c >> d;
    ans = 100000000000000000;
    if (a > c) {
      swap(a, c);
      swap(b, d);
    }
    if (a == c) {
      cout << abs(b - d);
      cout << '\n';
      continue;
    }
    if (b == d) {
      if (ele.size() != 0) {
        auto ne = lower_bound(ele.begin(), ele.end(), b);
        if (ne != ele.end()) {
          distance = *ne - b;
          ans = min(ans, 2 * distance + ((c - a) + (v - 1)) / v);
        }
        if (ne != ele.begin()) {
          ne--;
          distance = b - *ne;
          ans = min(ans, 2 * distance + ((c - a) + (v - 1)) / v);
        }
      }
      if (stairs.size() != 0) {
        auto ns = lower_bound(stairs.begin(), stairs.end(), b);
        if (ns != stairs.end()) {
          distance = *ns - b;
          ans = min(ans, 2 * distance + (c - a));
        }
        if (ns != stairs.begin()) {
          ns--;
          distance = b - *ns;
          ans = min(ans, 2 * distance + c - a);
        }
      }
    } else if (b < d) {
      if (ele.size() != 0) {
        auto ne = lower_bound(ele.begin(), ele.end(), b);
        if (ne != ele.end()) {
          if (*ne <= d)
            ans = min(ans, d - b + ((c - a) + (v - 1)) / v);
          else
            ans = min(ans, d - b + 2 * (*ne - d) + ((c - a) + (v - 1)) / v);
        }
        if (ne != ele.begin()) {
          ne--;
          ans = min(ans, d - b + 2 * (b - *ne) + ((c - a) + (v - 1)) / v);
        }
      }
      if (stairs.size() != 0) {
        auto ns = lower_bound(stairs.begin(), stairs.end(), b);
        if (ns != stairs.end()) {
          if (*ns <= d)
            ans = min(ans, d - b + (c - a));
          else
            ans = min(ans, d - b + 2 * (*ns - d) + (c - a));
        }
        if (ns != stairs.begin()) {
          ns--;
          ans = min(ans, d - b + 2 * (b - *ns) + c - a);
        }
      }
    } else {
      if (ele.size() != 0) {
        auto ne = lower_bound(ele.begin(), ele.end(), b);
        if (ne != ele.end()) {
          ans = min(ans, b - d + 2 * (*ne - b) + ((c - a) + v - 1) / v);
        }
        if (ne != ele.begin()) {
          ne--;
          if (*ne >= d)
            ans = min(ans, b - d + ((c - a) + v - 1) / v);
          else
            ans = min(ans, b - d + ((c - a) + v - 1) / v + 2 * (d - *ne));
        }
      }
      if (stairs.size() != 0) {
        auto ns = lower_bound(stairs.begin(), stairs.end(), b);
        if (ns != stairs.end()) {
          ans = min(ans, b - d + 2 * (*ns - b) + (c - a));
        }
        if (ns != stairs.begin()) {
          ns--;
          if (*ns >= d)
            ans = min(ans, b - d + c - a);
          else
            ans = min(ans, b - d + c - a + 2 * (d - *ns));
        }
      }
    }
    cout << ans;
    cout << '\n';
  }
}
