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 = 1000000007;
void yes() {
  cout << "Yes"
       << "\n";
}
void no() {
  cout << "No"
       << "\n";
}
struct Sync_stdio {
  Sync_stdio() {
    cin.tie(NULL);
    ios_base::sync_with_stdio(false);
  }
} _sync_stdio;
struct FAIL {
  FAIL() {
    cout << "CHANGE!!!"
         << "\n";
  }
};
enum { LEST, ELEV };
long long calc(long long y1, long long y2, long long h, long long pos,
               long long type, long long v) {
  long long res = abs(y1 - pos) + abs(y2 - pos);
  if (type == LEST) {
    res += h;
  } else {
    res += (h + v - 1) / v;
  }
  return res;
}
int main() {
  long long n, m, c_l, c_e, v;
  cin >> n >> m >> c_l >> c_e >> v;
  vector<long long> l(c_l);
  for (int __i = 0; __i < (c_l); ++__i) cin >> l[__i];
  ;
  vector<long long> e(c_e);
  for (int __i = 0; __i < (c_e); ++__i) cin >> e[__i];
  ;
  int q;
  cin >> q;
  for (int i = (0); i < (q); ++i) {
    long long x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    long long h = abs(x2 - x1);
    if (h == 0) {
      cout << abs(y1 - y2) << "\n";
      continue;
    }
    long long ans = LLONG_MAX;
    int pos1_l = lower_bound(l.begin(), l.end(), y1) - l.begin();
    int pos2_l = upper_bound(l.begin(), l.end(), y2) - 1 - l.begin();
    int pos1_e = lower_bound(e.begin(), e.end(), y1) - e.begin();
    int pos2_e = upper_bound(e.begin(), e.end(), y2) - 1 - e.begin();
    if (0 <= pos1_l && pos1_l < l.size()) {
      ans = min(ans, calc(y1, y2, h, l[pos1_l], LEST, v));
    }
    if (0 <= pos2_l && pos2_l < l.size()) {
      ans = min(ans, calc(y1, y2, h, l[pos2_l], LEST, v));
    }
    if (0 <= pos1_e && pos1_e < e.size()) {
      ans = min(ans, calc(y1, y2, h, e[pos1_e], ELEV, v));
    }
    if (0 <= pos2_e && pos2_e < e.size()) {
      ans = min(ans, calc(y1, y2, h, e[pos2_e], ELEV, v));
    }
    cout << ans << "\n";
  }
}
