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.*;
import java.util.Locale;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class A implements Runnable {

    private static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    private BufferedReader in;
    private PrintWriter out;
    private StringTokenizer tok = new StringTokenizer("");

    private void init() throws FileNotFoundException {
        Locale.setDefault(Locale.US);
        String fileName = "";
        if (ONLINE_JUDGE && fileName.isEmpty()) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            if (fileName.isEmpty()) {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            } else {
                in = new BufferedReader(new FileReader(fileName + ".in"));
                out = new PrintWriter(fileName + ".out");
            }
        }
    }

    String readString() {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    int readInt() {
        return Integer.parseInt(readString());
    }

    long readLong() {
        return Long.parseLong(readString());
    }

    double readDouble() {
        return Double.parseDouble(readString());
    }

    int[] readIntArray(int size) {
        int[] a = new int[size];
        for (int i = 0; i < size; i++) {
            a[i] = readInt();
        }
        return a;
    }

    public static void main(String[] args) {
        //new Thread(null, new _Solution(), "", 128 * (1L << 20)).start();
        new A().run();
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    @Override
    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            init();
            solve();
            out.close();
            time();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    int[][] buildGraph(int n, int[] u, int[] v) {
        int[][] graph = new int[n][];
        int[] q = new int[n];
        for (int i = 0; i < u.length; i++) {
            q[u[i]]++;
            q[v[i]]++;
        }
        for (int i = 0; i < n; i++) {
            graph[i] = new int[q[i]];
        }
        for (int i = 0; i < u.length; i++) {
            graph[u[i]][--q[u[i]]] = v[i];
            graph[v[i]][--q[v[i]]] = u[i];
        }
        return graph;
    }

    private int aiverson(boolean good) {
        return good ? 1 : 0;
    }

    private void solve() {
        int n = readInt();
        int m = readInt();
        TreeSet<Integer> ladders = new TreeSet<>();
        TreeSet<Integer> elevators = new TreeSet<>();
        int cl = readInt();
        int ce = readInt();
        int v = readInt();
        for (int i = 0; i < cl; i++) {
            ladders.add(readInt());
        }
        for (int i = 0; i < ce; i++) {
            elevators.add(readInt());
        }

        int q = readInt();
        while (q-- > 0) {
            int x1 = readInt();
            int y1 = readInt();
            int x2 = readInt();
            int y2 = readInt();
            out.println(Math.min(count(x1, y1, x2, y2, ladders, elevators, v), count(x2, y2, x1, y1, ladders, elevators, v)));
        }
    }

    int count(int x1, int y1, int x2, int y2, TreeSet<Integer> ladders, TreeSet<Integer> elevators, int v) {
        if (x1 == x2) {
            return Math.abs(y1 - y2);
        }
        int answer = Integer.MAX_VALUE;
        Integer leftElevator = elevators.ceiling(y1);
        Integer rightElevator = elevators.floor(y1);
        if (leftElevator != null) {
            int time = Math.abs(y1 - leftElevator) + Math.abs(leftElevator - y2) + elevator(Math.abs(x1 - x2), v);
            answer = Math.min(answer, time);
        }
        if (rightElevator != null) {
            int time = Math.abs(y1 - rightElevator) + Math.abs(rightElevator - y2) + elevator(Math.abs(x1 - x2), v);
            answer = Math.min(answer, time);
        }

        Integer leftLadder = ladders.ceiling(y1);
        Integer rightLadder = ladders.floor(y1);

        if (leftLadder != null) {
            int time = Math.abs(y1 - leftLadder) + Math.abs(leftLadder - y2) + Math.abs(x1 - x2);
            answer = Math.min(answer, time);
        }
        if (rightLadder != null) {
            int time = Math.abs(y1 - rightLadder) + Math.abs(rightLadder - y2) + Math.abs(x1 - x2);
            answer = Math.min(answer, time);
        }

        return answer;
    }

    int elevator(int dist, int v) {
        if (dist % v == 0) {
            return dist / v;
        }
        return dist / v + 1;
    }
}