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 gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
bool isperfect(long long n) {
  long long y = sqrt(n);
  if (n % y == 0 && y * y == n) return true;
  return false;
}
bool comp(pair<int, int> a, pair<int, int> b) {
  if (a.first == b.first) return a.second > b.second;
  return a.first < b.first;
}
long long powi(long long a, long long b) {
  long long ans = 1;
  while (b > 0) {
    if (b & 1) ans = (ans * a);
    b = b >> 1;
    a = (a * a);
  }
  return ans;
}
bool isprime(long long n) {
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
bool prime[10000000];
void seive() {
  prime[1] = true;
  for (int i = 2; i * i < 10000000; i++) {
    if (prime[i]) continue;
    for (int j = i * i; j < 10000000; j += i) {
      prime[j] = true;
    }
  }
}
vector<long long int> v[200005];
bool vis[200005];
void dfs(int s, int &cnt) {
  vis[s] = true;
  cnt++;
  for (auto c : v[s]) {
    if (!vis[c]) {
      dfs(c, cnt);
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m, cl, ce, v;
  cin >> n >> m >> cl >> ce >> v;
  vector<long long int> lift(cl), ele(ce);
  for (int i = 0; i < cl; i++) cin >> lift[i];
  for (int i = 0; i < ce; i++) cin >> ele[i];
  int q;
  cin >> q;
  for (int i = 0; i < q; i++) {
    int x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    int floors = x2 - x1;
    if (floors == 0) {
      cout << abs(y2 - y1) << endl;
      continue;
    }
    if (y1 > y2) {
      swap(y1, y2);
      swap(x1, x2);
    }
    if (cl > 0 && ce > 0) {
      int lb1 = lower_bound(lift.begin(), lift.end(), y1) - lift.begin();
      if (lb1 > cl - 1) lb1 = cl - 1;
      long long ans1 = abs(lift[lb1] - y1) + abs(lift[lb1] - y2) + abs(x2 - x1);
      int lb = lower_bound(ele.begin(), ele.end(), y1) - ele.begin();
      if (lb > ce - 1) lb = ce - 1;
      long long ans2 = abs(ele[lb] - y1) + abs(ele[lb] - y2) +
                       (abs(x2 - x1)) / v + ((abs(x2 - x1)) % v != 0);
      if (lb1 > 0) {
        lb1--;
        ans1 =
            min(ans1, abs(lift[lb1] - y1) + abs(lift[lb1] - y2) + abs(x2 - x1));
      }
      if (lb > 0) {
        lb--;
        ans2 = min(ans2, abs(ele[lb] - y1) + abs(ele[lb] - y2) +
                             (abs(x2 - x1)) / v + ((abs(x2 - x1)) % v != 0));
      }
      cout << min(ans1, ans2) << endl;
    } else if (cl == 0) {
      int lb = lower_bound(ele.begin(), ele.end(), y1) - ele.begin();
      if (lb > ce - 1) lb = ce - 1;
      long long ans2 = abs(ele[lb] - y1) + abs(ele[lb] - y2) +
                       (abs(x2 - x1)) / v + ((abs(x2 - x1)) % v != 0);
      if (lb > 0) {
        lb--;
        ans2 = min(ans2, abs(ele[lb] - y1) + abs(ele[lb] - y2) +
                             (abs(x2 - x1)) / v + ((abs(x2 - x1)) % v != 0));
      }
      cout << ans2 << endl;
    } else {
      int lb1 = lower_bound(lift.begin(), lift.end(), y1) - lift.begin();
      if (lb1 > cl - 1) lb1 = cl - 1;
      long long ans1 = abs(lift[lb1] - y1) + abs(lift[lb1] - y2) + abs(x2 - x1);
      if (lb1 > 0) {
        lb1--;
        ans1 =
            min(ans1, abs(lift[lb1] - y1) + abs(lift[lb1] - y2) + abs(x2 - x1));
      }
      cout << ans1 << endl;
    }
  }
}
