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 static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

public class CF {

    static class server {

        int dist;
        int index;

        public server(int dist, int index) {
            this.dist = dist;
            this.index = index;
        }

    }

    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = in.nextInt();
        int m = in.nextInt();
        int cl = in.nextInt();
        int ce = in.nextInt();
        int[] tabS = new int[cl];
        int[] tabE = new int[ce];
        int v = in.nextInt();
        if (cl == 0) {
            in.next();
        }
        for (int i = 0; i < cl; i++) {
            tabS[i] = in.nextInt() - 1;
        }
        if (ce == 0) {
            in.next();
        }
        for (int i = 0; i < ce; i++) {
            tabE[i] = in.nextInt() - 1;
        }
        int q = in.nextInt();
        for (int i = 0; i < q; i++) {
            int x1 = in.nextInt() - 1;
            int y1 = in.nextInt() - 1;
            int x2 = in.nextInt() - 1;
            int y2 = in.nextInt() - 1;
            int s1 = abs(x1 - x2);
            if (cl == 0) {
                s1 = Integer.MAX_VALUE;
            } else {
                int index = upper_bound(tabS, y1, false);
                int min1 = Integer.MAX_VALUE;
                if (index > -1) {
                    min1 = abs(tabS[index] - y1) + abs(y2 - tabS[index]);
                }
                int min2 = Integer.MAX_VALUE;
                index = upper_bound(tabS, y2, false);
                if (index > -1) {
                    min2 = abs(tabS[index] - y1) + abs(y2 - tabS[index]);
                }
                s1 += min(min1, min2);
            }

            int s2 = (int) ceil((double) abs(x1 - x2) / v);
            if (ce == 0) {
                s2 = Integer.MAX_VALUE;
            } else {
                int index = upper_bound(tabE, y1, false);
                int min1 = Integer.MAX_VALUE;
                min1 = abs(tabE[index] - y1) + abs(y2 - tabE[index]);
                int min2 = Integer.MAX_VALUE;
                index = upper_bound(tabE, y2, false);
                min2 = abs(tabE[index] - y1) + abs(y2 - tabE[index]);

                s2 += min(min1, min2);
            }
            out.println(min(s1, s2));
        }
        out.close();
    }

    public static int upper_bound(int[] tab, int x, boolean searchFirst) {
        int n = tab.length;
        int low = 0;
        int high = n - 1;
        int res = -1;   //if element not found
        int mid;
        while (low <= high) {
            mid = low + (high - low) / 2;
            if (tab[mid] == x) {
                res = mid;
                if (searchFirst) {
                    high = mid - 1;
                } //to find first , go left
                else {
                    low = mid + 1;
                }                // to find last, go right
            } else if (x > tab[mid]) {
                low = mid + 1;
            } else {
                high = mid - 1;
            }
        }
        return (high == -1) ? low : high;
    }

    public static boolean log2(long n) {
        if ((Math.log(n) / Math.log(2)) == (int) (Math.log(n) / Math.log(2))) {
            return true;
        } else {
            return false;
        }
    }

    private static boolean isFirstPlayerWinner(long[] stones) {
        if (stones.length == 1) {
            return stones[0] >= 1;
        }

        long totalStones = stones[0];
        long xorValue = stones[0];

        for (int s = 1; s < stones.length; s++) {
            totalStones += stones[s];
            xorValue ^= stones[s];
        }
        if (totalStones == stones.length) {
            return totalStones % 2 == 0;
        }
        System.out.println(Long.toBinaryString(xorValue));
        return xorValue > 0;
    }

    static class FastScanner {

        private BufferedReader in;
        private String[] line;
        private int index;
        private int size;

        public FastScanner(InputStream in) throws IOException {
            this.in = new BufferedReader(new InputStreamReader(in));
            init();
        }

        public FastScanner(String file) throws FileNotFoundException {
            this.in = new BufferedReader(new FileReader(file));
        }

        private void init() throws IOException {
            line = in.readLine().split(" ");
            index = 0;
            size = line.length;
        }

        public int nextInt() throws IOException {
            if (index == size) {
                init();
            }
            return Integer.parseInt(line[index++]);
        }

        public long nextLong() throws IOException {
            if (index == size) {
                init();
            }
            return Long.parseLong(line[index++]);
        }

        public float nextFloat() throws IOException {
            if (index == size) {
                init();
            }
            return Float.parseFloat(line[index++]);
        }

        public double nextDouble() throws IOException {
            if (index == size) {
                init();
            }
            return Double.parseDouble(line[index++]);
        }

        public String next() throws IOException {
            if (index == size) {
                init();
            }
            return line[index++];
        }

        public String nextLine() throws IOException {
            if (index == size) {
                init();
            }
            StringBuilder sb = new StringBuilder();
            for (; index < size; index++) {
                sb.append(line[index]).append(" ");
            }
            return sb.toString();
        }

        private int[] nextIntArray(int n) throws IOException {
            int[] tab = new int[n];
            for (int i = 0; i < tab.length; i++) {
                tab[i] = nextInt();
            }
            return tab;
        }

        private long[] nextLongArray(int n) throws IOException {
            long[] tab = new long[n];
            for (int i = 0; i < tab.length; i++) {
                tab[i] = nextLong();
            }
            return tab;
        }

        private double[] nextDoubleArray(int n) throws IOException {
            double[] tab = new double[n];
            for (int i = 0; i < tab.length; i++) {
                tab[i] = nextDouble();
            }
            return tab;
        }

    }

}
