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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.StringTokenizer;

public class CF967C {

  public static class FastReader {
    BufferedReader br;
    StringTokenizer st;

    public FastReader() {
      br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

    int nextInt() { return Integer.parseInt(next()); }

    long nextLong() { return Long.parseLong(next()); }

    double nextDouble() { return Double.parseDouble(next()); }

    String nextLine() {
      String str = "";
      try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      }
      return str;
    }
  }

  static int evaluate_path(int x1, int y1, int x2, int y2, int e, double v) {
    double z = Math.abs(x2 - x1);
    double result = Math.ceil(z / v);
    return Math.abs(e - y1) + Math.abs(e - y2) + (int)result;
  }

  static int check_best(ArrayList<Integer> stairs, int pos, int x1, int y1,
                        int x2, int y2, int v, int best_path) {
    if (pos != stairs.size()) {
      int current_path = evaluate_path(x1, y1, x2, y2, stairs.get(pos), v);
      if (current_path < best_path) {
        best_path = current_path;
        // System.out.println("Best with stair " + stairs.get(pos) + " = " +
        // best_path);
      }
    }
    if (pos != 0) {
      int current_path = evaluate_path(x1, y1, x2, y2, stairs.get(pos - 1), v);
      if (current_path < best_path) {
        best_path = current_path;
        // System.out.println("Best with stair " + stairs.get(pos - 1) + " = " +
        // best_path);
      }
    }
    return best_path;
  }

  public static void main(String[] args) {
    FastReader reader = new FastReader();
    int n = reader.nextInt(), m = reader.nextInt(), cl = reader.nextInt(),
        ce = reader.nextInt(), v = reader.nextInt();

    ArrayList<Integer> stairs = new ArrayList<>();
    for (int i = 0; i < cl; i++) {
      stairs.add(reader.nextInt());
    }
    ArrayList<Integer> elevators = new ArrayList<>();
    for (int i = 0; i < ce; i++) {
      elevators.add(reader.nextInt());
    }
    int q = reader.nextInt();
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < q; i++) {
      int x1 = reader.nextInt(), y1 = reader.nextInt(), x2 = reader.nextInt(),
          y2 = reader.nextInt();

      int stairs1 = (-1) * Collections.binarySearch(stairs, y1) - 1;
      int stairs2 = (-1) * Collections.binarySearch(stairs, y2) - 1;
      int elevators1 = (-1) * Collections.binarySearch(elevators, y1) - 1;
      int elevators2 = (-1) * Collections.binarySearch(elevators, y2) - 1;

      int best =
          check_best(stairs, stairs1, x1, y1, x2, y2, 1, Integer.MAX_VALUE);
      best = check_best(stairs, stairs2, x1, y1, x2, y2, 1, best);
      best = check_best(elevators, elevators1, x1, y1, x2, y2, v, best);
      best = check_best(elevators, elevators2, x1, y1, x2, y2, v, best);
      sb.append(best).append('\n');
    }
    System.out.print(sb);
  }
}