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 n, m, c1, c2, v;
char ss[110];
int loc1[int(1e5 + 7)], loc2[int(1e5 + 7)];
int lc1[10], lc2[10];
int main() {
  scanf("%d%d%d%d%d", &n, &m, &c1, &c2, &v);
  if (!c1)
    gets(ss);
  else {
    for (int i = 1; i <= c1; i++) scanf("%d", &loc1[i]);
  }
  if (!c2)
    gets(ss);
  else {
    for (int i = 1; i <= c2; i++) scanf("%d", &loc2[i]);
  }
  int q;
  scanf("%d", &q);
  while (q--) {
    int x1, x2, y1, y2;
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    if (x1 == x2)
      printf("%d\n", abs(y2 - y1));
    else {
      int ri = max(y1, y2), le = min(y1, y2);
      int up = max(x1, x2), down = min(x1, x2);
      int cnt1 = 0, cnt2 = 0;
      if (c1 != 0) {
        int pos1 = lower_bound(loc1 + 1, loc1 + 1 + c1, le) - loc1;
        if (pos1 <= c1) {
          lc1[++cnt1] = pos1;
          if (pos1 >= 2) lc1[++cnt1] = pos1 - 1;
          pos1 = lower_bound(loc1 + 1, loc1 + 1 + c1, ri) - loc1;
          if (pos1 <= c1) lc1[++cnt1] = pos1;
        } else {
          lc1[++cnt1] = c1;
        }
      }
      if (c2 != 0) {
        int pos2 = lower_bound(loc2 + 1, loc2 + 1 + c2, le) - loc2;
        if (pos2 <= c2 && c2 > 0) {
          lc2[++cnt2] = pos2;
          if (pos2 >= 2) lc2[++cnt2] = pos2 - 1;
          pos2 = lower_bound(loc2 + 1, loc2 + 1 + c2, ri) - loc2;
          if (pos2 <= c2) lc2[++cnt2] = pos2;
        } else {
          lc2[++cnt2] = c2;
        }
      }
      int ans = int(1e9);
      for (int i = 1; i <= cnt1; i++) {
        int tmp = abs(loc1[lc1[i]] - y1) + abs(loc1[lc1[i]] - y2) + up - down;
        ans = min(tmp, ans);
      }
      for (int i = 1; i <= cnt2; i++) {
        int tmp = abs(loc2[lc2[i]] - y1) + abs(loc2[lc2[i]] - y2) +
                  (int)ceil((up - down) * 1.0 / v * 1.0);
        ans = min(tmp, ans);
      }
      printf("%d\n", ans);
    }
  }
}
