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;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const int N = 1e5 + 5;
vector<long long> sta, ele;
long long n, m, l, e, v;
long long min4(long long a, long long b, long long c, long long d) {
  return min(a, min(b, min(c, d)));
}
long long min5(long long e, long long a, long long b, long long c,
               long long d) {
  return min(e, min4(a, b, c, d));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  cin >> n >> m >> l >> e >> v;
  for (int i = 1; i <= l; i++) {
    long long x;
    cin >> x;
    sta.push_back(x);
  }
  for (int i = 1; i <= e; i++) {
    long long x;
    cin >> x;
    ele.push_back(x);
  }
  int q;
  cin >> q;
  while (q--) {
    long long x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    if (x1 == x2) {
      cout << abs(y1 - y2) << endl;
    } else {
      long long ans = 2e18;
      long long s_l, e_l, s_r, e_r;
      s_l = e_l = s_r = e_r = 2e18;
      int idx2 = upper_bound(sta.begin(), sta.end(), y1) - sta.begin();
      int idx1 = idx2 - 1;
      int idx2_e = upper_bound(ele.begin(), ele.end(), y1) - ele.begin();
      int idx1_e = idx2_e - 1;
      if (idx1 >= 0 && idx1 < sta.size()) {
        long long leftwali = sta[idx1];
        s_l = abs(leftwali - y1) + abs(x2 - x1) + abs(leftwali - y2);
      }
      if (idx1_e >= 0 && idx1_e < ele.size()) {
        long long leftwalilift = ele[idx1_e];
        e_l = abs(leftwalilift - y1) +
              ceil((double)abs((double)x2 - (double)x1) / (double)v) +
              abs(leftwalilift - y2);
      }
      if (idx2 >= 0 && idx2 < sta.size()) {
        long long rightwali = sta[idx2];
        s_r = abs(rightwali - y1) + abs(x2 - x1) + abs(rightwali - y2);
      }
      if (idx2_e >= 0 && idx2_e < ele.size()) {
        long long rightwalilift = ele[idx2_e];
        e_r = abs(rightwalilift - y1) +
              ceil((double)abs((double)x2 - (double)x1) / (double)v) +
              abs(rightwalilift - y2);
      }
      ans = min4(s_l, s_r, e_l, e_r);
      cout << ans << "\n";
    }
  }
  return 0;
}
