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


/**
 * Date: 29 Apr, 2018
 * Link:
 *
 * @author Prasad-Chaudhari
 * @email prasadc8897@gmail.com
 */
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;

public class newProgram2 {

    public static void main(String[] args) throws IOException {
        // TODO code application logic here
        FastIO2 in = new FastIO2();
        int n = in.ni();
        int m = in.ni();
        int cl = in.ni();
        int ce = in.ni();
        int v = in.ni();
        int stairs[] = new int[cl];
        if(cl==0){
            cl=1;
            stairs = new int[1];
            in.next();
            stairs[0]=-1;
        }
        else{
            for (int i = 0; i < cl; i++) {
                int p = in.ni() - 1;
                stairs[i] = p;
            }
        }
        int lifts[] = new int[ce];
        if(ce==0){
            ce=1;
            lifts = new int[1];
            lifts [0]= -1;
            in.next();
        }
        else{
            for (int i = 0; i < ce; i++) {
                int p = in.ni() - 1;
                lifts[i] = p;
            }
        }
        int q = in.ni();
        while (q-- > 0) {
            int x1 = in.ni() - 1;
            int y1 = in.ni() - 1;
            int x2 = in.ni() - 1;
            int y2 = in.ni() - 1;
            if (x2 == x1) {
                System.out.println(Math.abs(y1 - y2));
            } else {
                long time = Long.MAX_VALUE;
                int index1 = Arrays.binarySearch(stairs, y1);
                int index2 = Arrays.binarySearch(lifts, y1);
                if (index2 < 0) {
                    index2 = -(index2 + 1);
                    if (index2 != ce) {
                        time = Math.min(time, lift(x1, y1, x2, y2, lifts[index2], v));
                    }
                    if (index2 != 0) {
                        time = Math.min(time, lift(x1, y1, x2, y2, lifts[index2 - 1], v));
                    }

                } else {
                    time = Math.min(time, lift(x1, y1, x2, y2, lifts[index2], v));
                }
                if (index1 < 0) {
                    index1 = -(index1 + 1);
                    if (index1 != cl) {
                        time = Math.min(time, floor(x1, y1, x2, y2, stairs[index1]));
                    }
                    if (index1 != 0) {
                        time = Math.min(time, floor(x1, y1, x2, y2, stairs[index1 - 1]));
                    }
                } else {
                    time = Math.min(time, floor(x1, y1, x2, y2, stairs[index1]));
                }
                System.out.println(time);
            }
        }
    }

    private static long lift(int x1, int y1, int x2, int y2, long elevator, int v) {
//        System.out.print(x1 + " " + y1 + " " + x2 + " " + y2 + " " + elevator + " " + v + " ");
        if(elevator==-1){
            return Math.abs(x1-x2)+Math.abs(y1-y2);
        }
        long time = Math.abs(y1 - y2);
        if (Math.min(y1, y2) > elevator) {
            time += 2 * (Math.min(y1, y2) - elevator);
        }
//        System.out.println(time);
        if (Math.max(y1, y2) < elevator) {
            time += 2 * (elevator - Math.max(y1, y2));
        }
//        System.out.println(time);
        time += Math.abs(x1 - x2) / v;
        if (Math.abs(x1 - x2) % v != 0) {
            time++;
        }
        return time;
    }

    private static long floor(int x1, int y1, int x2, int y2, long stairs) {
//        System.out.print(x1 + " " + y1 + " " + x2 + " " + y2 + " " + stairs + " ");
        if(stairs==-1){
            return Math.abs(x1-x2)+Math.abs(y1-y2);
        }
        long time = Math.abs(x2 - x1) + Math.abs(y2 - y1);
        if (Math.min(y2, y1) > stairs) {
            time += 2 * (Math.min(y1, y2) - stairs);
        }
//        System.out.println(time);
        if (Math.max(y2, y1) < stairs) {
            time += (2 * (stairs - Math.max(y2, y1)));
        }
        return time;
    }

    static class FastIO2 {

        private final BufferedReader br;
        private String s[];
        private int index;

        public FastIO2() throws IOException {
            br = new BufferedReader(new InputStreamReader(System.in));
            s = br.readLine().split(" ");
            index = 0;
        }

        public int ni() throws IOException {
            return Integer.parseInt(nextToken());
        }

        public double nd() throws IOException {
            return Double.parseDouble(nextToken());
        }

        public long nl() throws IOException {
            return Long.parseLong(nextToken());
        }

        public String next() throws IOException {
            return nextToken();
        }

        public String nli() throws IOException {
            try {
                return br.readLine();
            } catch (IOException ex) {

            }
            return null;
        }

        public int[] gia(int n) throws IOException {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }

        public int[] gia(int n, int start, int end) throws IOException {
            validate(n, start, end);
            int a[] = new int[n];
            for (int i = start; i < end; i++) {
                a[i] = ni();
            }
            return a;
        }

        public double[] gda(int n) throws IOException {
            double a[] = new double[n];
            for (int i = 0; i < n; i++) {
                a[i] = nd();
            }
            return a;
        }

        public double[] gda(int n, int start, int end) throws IOException {
            validate(n, start, end);
            double a[] = new double[n];
            for (int i = start; i < end; i++) {
                a[i] = nd();
            }
            return a;
        }

        public long[] gla(int n) throws IOException {
            long a[] = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }

        public long[] gla(int n, int start, int end) throws IOException {
            validate(n, start, end);
            long a[] = new long[n];
            for (int i = start; i < end; i++) {
                a[i] = ni();
            }
            return a;
        }

        private String nextToken() throws IndexOutOfBoundsException, IOException {
            if (index == s.length) {
                s = br.readLine().split(" ");
                index = 0;
            }
            return s[index++];
        }

        private void validate(int n, int start, int end) {
            if (start < 0 || end >= n) {
                throw new IllegalArgumentException();
            }
        }
    }
}

class Data {

    int a, b;

    public Data(int a, int b) {
        this.a = a;
        this.b = b;
    }

}

class Com implements Comparator<Data> {

    @Override
    public int compare(Data a, Data b) {
        if (a.a == b.a) {
            if (a.b == b.b) {
                return 0;
            } else {
                return a.b - b.b;
            }
        } else {
            return a.a - b.a;
        }
    }
}
