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.Arrays;
import java.util.StringTokenizer;

import static java.lang.Math.abs;
import static java.lang.Math.max;
import static java.lang.Math.min;


/**
 * Created by Katushka on 08.02.2020.
 */
public class StairsAndElevators {

    private static int insertionPoint(int[] a, int elem) {
        int l1 = Arrays.binarySearch(a, elem);

        if (l1 < 0) {
            l1 = -l1 - 1;
        }
        return l1;
    }

    public static void main(String[] args) throws FileNotFoundException {
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));

        int n = in.nextInt();
        int m = in.nextInt();
        int cl = in.nextInt();
        int ce = in.nextInt();
        int v = in.nextInt();
        int[] ls;
        int[] es;
        if (v == 1) {
            ls = new int[cl + ce];
            for (int i = 0; i < cl; i++) {
                ls[i] = in.nextInt();
            }
            for (int i = 0; i < ce; i++) {
                ls[i + cl] = in.nextInt();
            }
            es = new int[0];
        } else {
            ls = new int[cl];
            es = new int[ce];
            for (int i = 0; i < cl; i++) {
                ls[i] = in.nextInt();
            }
            for (int i = 0; i < ce; i++) {
                es[i] = in.nextInt();
            }
        }

        int q = in.nextInt();
        Arrays.sort(ls);
        Arrays.sort(es);

        for (int i = 0; i < q; i++) {
            int r1 = in.nextInt();
            int c1 = in.nextInt();
            int r2 = in.nextInt();
            int c2 = in.nextInt();

            if (r1 == r2) {
                out.println(abs(c2 - c1));
            } else {
                int l1 = insertionPoint(ls, min(c1, c2));
                int l2 = insertionPoint(ls, max(c1, c2));

                int ans = Integer.MAX_VALUE;
                if (l1 < l2) {
                    ans = abs(r2 - r1) + abs(c2 - c1);
                } else {
                    int delta = Integer.MAX_VALUE;
                    if (l1 > 0) {
                        delta = min(c1, c2) - ls[l1 - 1];
                    }
                    if (l2 < ls.length) {
                        delta = min(delta, ls[l2] - max(c1, c2));
                    }
                    if (delta < Integer.MAX_VALUE) {
                        ans = min(ans, delta * 2 + abs(r2 - r1) + abs(c2 - c1));
                    }

                }

                int e1 = insertionPoint(es, min(c1, c2));
                int e2 = insertionPoint(es, max(c1, c2));

                if (e1 < e2) {
                    ans = (int) min(ans, abs(c2 - c1) + Math.ceil(abs(r2 - r1) * 1.0 / v));
                } else {
                    int delta = Integer.MAX_VALUE;
                    if (e1 > 0) {
                        delta = min(c1, c2) - es[e1 - 1];
                    }
                    if (e2<es.length) {
                        delta = min(delta, es[e2] - max(c1, c2));
                    }
                    if (delta< Integer.MAX_VALUE) {
                        ans = (int) min(ans, delta * 2 + Math.ceil(abs(r2 - r1) * 1.0 / v) + abs(c2 - c1));
                    }
                }
                out.println(ans);

            }
        }


        out.close();
    }

    private static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public String nextString() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }

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

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

        public char nextChar() {
            return next().charAt(0);
        }
    }
}
