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 min(int a, int b) {
  if (a <= b) {
    return a;
  } else {
    return b;
  }
}
void bin(int x, int* a, int l, int r, int& i, int& j) {
  if (r - l == 1) {
    i = l, j = r;
  }
  if (x < a[l]) {
    i = -1, j = l;
  } else {
    if (x > a[r]) {
      i = r, j = -2;
    } else {
      int mid = (l + r) / 2;
      if (x < a[mid]) {
        bin(x, a, l, mid, i, j);
      } else {
        bin(x, a, mid + 1, r, i, j);
      }
    }
  }
}
int main() {
  long int n, m, cln, cen, v, q;
  cin >> n >> m >> cen >> cln >> v;
  int* l = new int[cln];
  int* e = new int[cen];
  for (int i = 0; i < cen; i++) {
    cin >> e[i];
  }
  for (int i = 0; i < cln; i++) {
    cin >> l[i];
  }
  cin >> q;
  int x1, x2, y1, y2, cl, ce;
  int ans, flag = 0;
  for (int i = 0; i < q; i++) {
    cin >> y1 >> x1 >> y2 >> x2;
    int i1, i2, j1, j2;
    bin(x1, l, 0, cln - 1, i1, i2);
    bin(x2, l, 0, cln - 1, j1, j2);
    if (i1 == -1) {
      cl = l[0];
    } else {
      if (i2 == -2) {
        cl = l[cln - 1];
      } else {
        if (i2 < j1) {
          cl = l[i2];
        } else {
          if (i1 > j2) {
            cl = l[j2];
          } else {
            if (min(abs(x1 - l[i1]), abs(x2 - l[i1])) <=
                min(abs(x1 - l[i2]), abs(x2 - l[i2]))) {
              cl = l[i1];
            } else {
              cl = l[i2];
            }
          }
        }
      }
    }
    bin(x1, e, 0, cen - 1, i1, i2);
    bin(x2, e, 0, cen - 1, j1, j2);
    if (i1 == -1) {
      ce = e[0];
    } else {
      if (i2 == -2) {
        ce = e[cen - 1];
      } else {
        if (i2 < j1) {
          ce = e[i2];
        } else {
          if (i1 > j2) {
            ce = e[j2];
          } else {
            if (min(abs(x1 - e[i1]), abs(x2 - e[i1])) <=
                min(abs(x1 - e[i2]), abs(x2 - e[i2]))) {
              ce = e[i1];
            } else {
              ce = e[i2];
            }
          }
        }
      }
    }
    flag = abs(y1 - y2) % v;
    if (flag != 0) {
      flag = 1;
    }
    if (((x1 < cl) && (x2 > cl)) || ((x1 > cl) && (x2 < cl))) {
      ans = abs(x1 - x2) + abs(y1 - y2) / v + flag;
    } else {
      if (((x1 < ce) && (x2 > ce)) || ((x1 > ce) && (x2 < ce))) {
        int x, y;
        x = abs(x1 - x2) + abs(y1 - y2);
        y = 2 * min(abs(x1 - cl), abs(x2 - cl)) + abs(x1 - x2) +
            abs(y1 - y2) / v + flag;
        ans = min(x, y);
      } else {
        int x, y;
        x = 2 * min(abs(x1 - ce), abs(x2 - ce)) + abs(x1 - x2) + abs(y1 - y2);
        y = 2 * min(abs(x1 - cl), abs(x2 - cl)) + abs(x1 - x2) +
            abs(y1 - y2) / v + flag;
        ans = min(x, y);
      }
    }
    cout << ans << endl;
  }
  return 0;
}
