#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;
}
