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 T>
std::ostream &operator<<(std::ostream &out, vector<T> &v) {
  for (typename vector<T>::size_type i = 0; i < v.size(); ++i)
    out << v[i] << " ";
  out << "\n";
  return out;
}
template <typename T>
std::ostream &operator<<(std::ostream &out, set<T> &s) {
  for (auto e : s) out << e << " ";
  out << "\n";
  return out;
}
template <typename T, typename N>
std::ostream &operator<<(std::ostream &out, pair<T, N> &p) {
  out << "(" << p.first << ", " << p.second << ") ";
  return out;
}
template <typename T, typename N>
std::ostream &operator<<(std::ostream &out, vector<pair<T, N> > &v) {
  for (size_t i = 0; i < v.size(); ++i) cout << v[i];
  out << "\n";
  return out;
}
template <typename T>
std::ostream &operator<<(std::ostream &out, vector<vector<T> > &v) {
  for (size_t i = 0; i < v.size(); ++i) {
    for (size_t j = 0; j < v[i].size(); ++j) {
      out << v[i][j] << " ";
    }
    out << "\n";
  }
  return out;
}
template <typename T>
std::ostream &operator<<(std::ostream &out, vector<set<T> > &v) {
  for (size_t i = 0; i < v.size(); ++i) {
    out << v[i];
  }
  out << "\n";
  return out;
}
int get_stair_distance(int x1, int x2, int y1, int y2, int stairs_coor, int v) {
  int time_stairs =
      abs(y1 - stairs_coor) + abs(x2 - x1) + abs(stairs_coor - y2);
  return time_stairs;
}
int get_elevator_distance(int x1, int x2, int y1, int y2, int elevators_coor,
                          int v) {
  int time_elevators = abs(y1 - elevators_coor) + (abs(x2 - x1) + v - 1) / v +
                       abs(elevators_coor - y2);
  return time_elevators;
}
void solve() {
  int n, m, cl, ce, v;
  cin >> n >> m >> cl >> ce >> v;
  vector<int> stairs(cl);
  for (int i = 0; i < cl; ++i) {
    cin >> stairs[i];
  }
  vector<int> elevators(ce);
  for (int i = 0; i < ce; ++i) {
    cin >> elevators[i];
  }
  int q;
  cin >> q;
  int x1, x2, y1, y2;
  while (q--) {
    cin >> x1 >> y1 >> x2 >> y2;
    vector<int>::iterator low_stairs =
        lower_bound(stairs.begin(), stairs.end(), y2);
    vector<int>::iterator low_elevators =
        lower_bound(elevators.begin(), elevators.end(), y2);
    int time_stairs, time_elevators;
    int elevator_coor, stairs_coor;
    int min_dist_stairs = 2e9;
    if (cl) {
      if (low_stairs == stairs.begin()) {
        stairs_coor = *low_stairs;
        min_dist_stairs = get_stair_distance(x1, x2, y1, y2, *low_stairs, v);
      } else if (low_stairs == stairs.end()) {
        stairs_coor = stairs.back();
        min_dist_stairs = get_stair_distance(x1, x2, y1, y2, stairs.back(), v);
      } else {
        auto prev = low_stairs;
        --prev;
        if (*low_stairs - y1 < y1 - *prev) {
          stairs_coor = *low_stairs;
        } else {
          stairs_coor = *prev;
        }
        min_dist_stairs =
            min(get_stair_distance(x1, x2, y1, y2, *low_stairs, v),
                get_stair_distance(x1, x2, y1, y2, *prev, v));
      }
    }
    int min_dist_elevators = 2e9;
    if (ce) {
      if (low_elevators == elevators.begin()) {
        elevator_coor = *elevators.begin();
        min_dist_elevators =
            get_elevator_distance(x1, x2, y1, y2, *elevators.begin(), v);
      } else if (low_elevators == elevators.end()) {
        elevator_coor = elevators.back();
        min_dist_elevators =
            get_elevator_distance(x1, x2, y1, y2, elevators.back(), v);
      } else {
        auto prev = low_elevators;
        --prev;
        if (*low_elevators - y1) {
          time_elevators = *low_elevators - y1;
          elevator_coor = *low_elevators;
        } else {
          time_elevators = y1 - *prev;
          elevator_coor = *prev;
        }
        min_dist_elevators =
            min(get_elevator_distance(x1, x2, y1, y2, *low_elevators, v),
                get_elevator_distance(x1, x2, y1, y2, *prev, v));
      }
    }
    int ans = min(min_dist_elevators, min_dist_stairs);
    if (x1 == x2) {
      ans = abs(y2 - y1);
    }
    cout << ans << "\n";
  }
  return;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
