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;
const int Max = 2e6 + 10;
const int Mod = 1e9 + 7;
const long long int Inf = 1LL << 62;
long long int stair[Max];
long long int elevator[Max];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long int n, m, c1, c2, v, q;
  while (cin >> n >> m >> c1 >> c2 >> v) {
    for (int i = 1; i <= c1; i++) {
      cin >> stair[i];
    }
    for (int i = 1; i <= c2; i++) {
      cin >> elevator[i];
    }
    cin >> q;
    while (q--) {
      long long int x1, y1, x2, y2, mn = Inf;
      cin >> x1 >> y1 >> x2 >> y2;
      long long int tot = abs(y1 - y2);
      long long int a = y1, b = y2;
      if (a > b) {
        swap(a, b);
      }
      long long int isStair = 0, isElevator = 0;
      long long int l = 1, r = c1;
      while (l <= r) {
        long long int mid = (l + r) >> 1;
        if (stair[mid] >= a && stair[mid] <= b) {
          isStair = 1;
          break;
        } else if (stair[mid] < a) {
          l = mid + 1;
        } else {
          r = mid - 1;
        }
      }
      l = 1, r = c2;
      while (l <= r) {
        long long int mid = (l + r) >> 1;
        if (elevator[mid] >= a && elevator[mid] <= b) {
          isElevator = 1;
          break;
        } else if (elevator[mid] < a) {
          l = mid + 1;
        } else {
          r = mid - 1;
        }
      }
      if (y1 > y2) {
        swap(y1, y2);
      }
      if (isStair) {
        mn = min(mn, tot + abs(x1 - x2));
      }
      if (isElevator) {
        mn = min(mn, tot + abs(x1 - x2) / v + (abs(x1 - x2) % v != 0));
      }
      if (x1 != x2) {
        l = 1, r = c1;
        long long int id = -1;
        while (l <= r) {
          long long int mid = (l + r) >> 1;
          if (stair[mid] >= y1) {
            id = stair[mid];
            r = mid - 1;
          } else {
            l = mid + 1;
          }
        }
        if (~id) {
          if (id > y2) {
            mn = min(mn, abs(x1 - x2) + tot + abs(id - y2) * 2);
          } else {
            mn = min(mn, abs(x1 - x2) + tot + abs(id - y1) * 2);
          }
        }
        l = 1, r = c1;
        id = -1;
        while (l <= r) {
          long long int mid = (l + r) >> 1;
          if (stair[mid] < y1) {
            id = stair[mid];
            l = mid + 1;
          } else {
            r = mid - 1;
          }
        }
        if (~id) {
          if (id > y2) {
            mn = min(mn, abs(x1 - x2) + tot + abs(id - y2) * 2);
          } else {
            mn = min(mn, abs(x1 - x2) + tot + abs(id - y1) * 2);
          }
        }
        l = 1, r = c2;
        id = -1;
        while (l <= r) {
          long long int mid = (l + r) >> 1;
          if (elevator[mid] >= y1) {
            id = elevator[mid];
            r = mid - 1;
          } else {
            l = mid + 1;
          }
        }
        if (~id) {
          if (id > y2) {
            mn = min(mn, abs(x1 - x2) / v + (abs(x1 - x2) % v != 0) + tot +
                             abs(id - y2) * 2);
          } else {
            mn = min(mn, abs(x1 - x2) / v + (abs(x1 - x2) % v != 0) + tot +
                             abs(id - y1) * 2);
          }
        }
        l = 1, r = c2;
        id = -1;
        while (l <= r) {
          long long int mid = (l + r) >> 1;
          if (elevator[mid] < y1) {
            id = elevator[mid];
            l = mid + 1;
          } else {
            r = mid - 1;
          }
        }
        if (~id) {
          if (id > y2) {
            mn = min(mn, abs(x1 - x2) / v + (abs(x1 - x2) % v != 0) + tot +
                             abs(id - y2) * 2);
          } else {
            mn = min(mn, abs(x1 - x2) / v + (abs(x1 - x2) % v != 0) + tot +
                             abs(id - y1) * 2);
          }
        }
      } else {
        mn = min(mn, tot);
      }
      cout << mn << endl;
    }
    cerr << "--------------------" << endl;
  }
  return 0;
}
