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.math.*;

public class StairsElevators {

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

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

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

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

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

        public double nextDouble() {
            return Double.parseDouble(next());
        }
    }

    static InputReader r = new InputReader(System.in);
    static PrintWriter pw = new PrintWriter(System.out);

    public static void main(String[] args) {
        
        int n = r.nextInt(); // #floors
        int m = r.nextInt(); // #sections/floor
        int ns = r.nextInt(); // # stairs
        int ne = r.nextInt(); // # elevators
        int v = r.nextInt(); // elevator speed
        int[] stairs = new int[ns+2];
        stairs[0] = (int) -1E9-7;
        stairs[ns+1] = (int) 1E9+7;
        for(int i = 1; i <= ns; i++){stairs[i] = r.nextInt();}
        int[] elevators = new int[ne+2];
        elevators[0] = (int) -1E9-7;
        elevators[ne+1] = (int) 1E9+7;
        for(int i = 1; i <= ne; i++){elevators[i] = r.nextInt();} 
        int queries = r.nextInt();
        for(int q = 1; q <= queries; q++){
            int x1 = r.nextInt(); // x is floor, y is section
            int y1 = r.nextInt();
            int x2 = r.nextInt();
            int y2 = r.nextInt();

            int LE, RE, LS, RS; // left elev, right elev, left stairs, right stairs
            int bss = Arrays.binarySearch(stairs, y1);
            int bse = Arrays.binarySearch(elevators, y1);
            if(bss < 0){
                bss = -bss-1;
            } if (bse < 0){
                bse = -bse-1;
            }
            // left is bs-1, right is bs position
            LE = Math.abs(y1-elevators[bse-1]) + (int)Math.ceil((1.0 * Math.abs(x1-x2) / v)) + Math.abs(y2-elevators[bse-1]);
            RE = Math.abs(y1-elevators[bse])   + (int)Math.ceil((1.0 * Math.abs(x1-x2) / v)) + Math.abs(y2-elevators[bse]);
            LS = Math.abs(y1-stairs[bss-1])    + Math.abs(x1-x2)                             + Math.abs(y2-stairs[bss-1]);
            RS = Math.abs(y1-stairs[bss])      + Math.abs(x1-x2)                             + Math.abs(y2-stairs[bss]);

            /**
            System.out.println(" (S)" + stairs[bss-1] + " " + stairs[bss] + " (E)" + elevators[bse-1] + " " + elevators[bse]);
            System.out.println(" LE" + LE + " RE" + RE + " LS" + LS + " RS" + RS);

            System.out.println(Math.abs(y1-elevators[bse])   + " " + (int)Math.ceil((1.0 * Math.abs(x1-x2) / v)) + " " + Math.abs(y2-elevators[bse]));
            System.out.println(y1-stairs[bss]       + " " + Math.abs(x1-x2)                             + " " + Math.abs(y2-stairs[bss]));
            */
            pw.println(Math.min(Math.min(LE, RE), Math.min(LS, RS)));
        }



        pw.close();
    }
}

/**
*                _        _                 _                                                
*               | |      | |               | |                                               
*   ___ ___   __| | ___  | |__  _   _    __| | __ _ _ __ _ __ ___ _ __     _   _  __ _  ___  
*  / __/ _ \ / _` |/ _ \ | '_ \| | | |  / _` |/ _` | '__| '__/ _ \ '_ \   | | | |/ _` |/ _ \ 
* | (_| (_) | (_| |  __/ | |_) | |_| | | (_| | (_| | |  | | |  __/ | | |  | |_| | (_| | (_) |
*  \___\___/ \__,_|\___| |_.__/ \__, |  \__,_|\__,_|_|  |_|  \___|_| |_|   \__, |\__,_|\___/ 
*                                __/ |                               ______ __/ |            
*  
*/