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;
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
char dir[] = {'R', 'L', 'D', 'U'};
const int MOD = 1e9 + 7;
const long long INF = 1e9;
void setIO(string filename) {
  if (fopen((filename + ".in").c_str(), "r")) {
    freopen((filename + ".in").c_str(), "r", stdin);
    freopen((filename + ".out").c_str(), "w", stdout);
  }
}
long long aceil(long long a, long long b) { return (a + b - 1) / b; }
void solve() {
  int n, m, stairs, elev, v;
  cin >> n >> m >> stairs >> elev >> v;
  vector<int> s(stairs), e(elev);
  for (auto &i : s) cin >> i;
  for (auto &i : e) cin >> i;
  sort((s).begin(), (s).end());
  sort((e).begin(), (e).end());
  int q;
  cin >> q;
  while (q--) {
    int x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    long long ans1 = 0, ans2 = 0;
    if (x1 == x2) {
      cout << abs(y1 - y2) << "\n";
      continue;
    }
    if (s.size()) {
      int p = lower_bound((s).begin(), (s).end(), y2) - s.begin();
      if (p == stairs) p--;
      ans1 += abs(s[p] - y1);
      ans1 += abs(x1 - x2);
      ans1 += abs(s[p] - y2);
    }
    if (e.size()) {
      int p = lower_bound((e).begin(), (e).end(), y2) - e.begin();
      if (p == elev) p--;
      ans2 += abs(e[p] - y1);
      long long dist = abs(x1 - x2);
      ans2 += aceil(dist, v);
      ans2 += abs(e[p] - y2);
    }
    if (ans1 == 0) ans1 = 1e18;
    if (ans2 == 0) ans2 = 1e18;
    cout << min(ans1, ans2) << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t = 1;
  for (int i = 1; i <= t; i++) solve();
  return 0;
}
