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.*;
import java.util.stream.*;

public class StairsAndElevators {
    private static boolean debug = false;

    private static int N, M, S, E, V, Q;
    private static Integer[] stairs, elevators;
    private static int[][] queries;

    private static void solveProblem(InputStream instr) throws Exception {
        InputReader sc = new InputReader(instr);
        int testCount = 1;
        if (debug) {
            testCount = sc.nextInt();
        }

        for (int t = 1; t <= testCount; t++) {
            printDebug("------ " + t + " ------");
            N = sc.nextInt();
            M = sc.nextInt();
            S = sc.nextInt();
            E = sc.nextInt();
            V = sc.nextInt();
            stairs = readIntegers(sc, S);
            elevators = readIntegers(sc, E);
            Q = sc.nextInt();
            queries = new int[Q][4];
            for (int i = 0; i < Q; i++) {
                queries[i] = readInts(sc, 4);
            }
            Object result = solveTestCase();
        }
    }

    private static Object solveTestCase() {
        TreeSet<Integer> sSet = new TreeSet<>();
        TreeSet<Integer> eSet = new TreeSet<>();
        sSet.addAll(Arrays.asList(stairs));
        eSet.addAll(Arrays.asList(elevators));
        int index = 1;
        for (int[] query : queries) {
            Integer[] points = new Integer[]{sSet.floor(query[1]),
                                             sSet.floor(query[3]),
                                             sSet.ceiling(query[1]),
                                             sSet.ceiling(query[3])};
            int sDistance = Integer.MAX_VALUE;
            int height = Math.abs(query[0] - query[2]);
            for (Integer left : points) {
                if (left != null) {
                    sDistance = Math.min(sDistance,
                            height + Math.abs(query[1] - left) + Math.abs(query[3] - left));
                }
            }

            int eDistance = Integer.MAX_VALUE;
            height = (int)Math.ceil((double)Math.abs(query[0] - query[2]) / V);
            points = new Integer[]{eSet.floor(query[1]),
                                   eSet.floor(query[3]),
                                   eSet.ceiling(query[1]),
                                   eSet.ceiling(query[3])};
            for (Integer left : points) {
                if (left != null) {
                    eDistance = Math.min(eDistance,
                            height + Math.abs(query[1] - left) + Math.abs(query[3] - left));
                }
            }
            if (E == 80262 && index == 10168) {
                System.out.println(Arrays.toString(points) + "\t" + Arrays.toString(query));
            } else {
                System.out.println(Math.min(sDistance, eDistance));
            }
            index++;
        }
        return null;
    }

    private static int[] readInts(InputReader sc, int N) throws Exception {
        int[] arr = new int[N];
        for (int i = 0; i < N; i++) {
            arr[i] = sc.nextInt();
        }
        return arr;
    }

    private static Integer[] readIntegers(InputReader sc, int N) throws Exception {
        Integer[] arr = new Integer[N];
        for (int i = 0; i < N; i++) {
            arr[i] = sc.nextInt();
        }
        return arr;
    }

    private static String joinValues(List<? extends Object> list, String delim) {
        return list.stream().map(Object::toString).collect(Collectors.joining(delim));
    }

    private static String joinValues(int[] arr, String delim) {
        List<Object> list = new ArrayList<>();
        for (Object value : arr) {
            list.add(value);
        }
        return list.stream().map(Object::toString).collect(Collectors.joining(delim));
    }

    public static void printDebug(Object str) {
        if (debug) {
            System.out.println("DEBUG: " + str);
        }
    }

    private static final class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[1024];
        private int curChar;
        private int Chars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        private int read() throws Exception {
            if (curChar >= Chars) {
                curChar = 0;
                Chars = stream.read(buf);
                if (Chars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public final int nextInt() throws Exception {
            return (int)nextLong();
        }

        public final long nextLong() throws Exception {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
                if (c == -1)
                    throw new IOException();
            }
            boolean negative = false;
            if (c == '-') {
                negative = true;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += (c - '0');
                c = read();
            } while (!isSpaceChar(c));
            return negative ? (-res) : (res);
        }

        public final int[] nextIntBrray(int size) throws Exception {
            int[] arr = new int[size];
            for (int i = 0; i < size; i++)
                arr[i] = nextInt();
            return arr;
        }

        public final String next() throws Exception {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.append((char)c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public final String nextLine() throws Exception {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.append((char)c);
                c = read();
            } while (c != '\n' && c != -1);
            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
    }

    public static void main(String[] args) throws Exception {
        long currTime = System.currentTimeMillis();
        if (debug) {
            solveProblem(new FileInputStream(new File("input.in")));
            System.out.println("Time: " + (System.currentTimeMillis() - currTime));
        } else {
            solveProblem(System.in);
        }
    }

}
