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

/**
 * Created by hapsi on 11.10.2016.
 */
public class Main {
    private static class FastScanner {
        private BufferedReader br;
        private StringTokenizer st;
        public FastScanner(InputStream inputStream){
            br = new BufferedReader(new InputStreamReader(inputStream));
        }
        public String next() {
            while (st == null || !st.hasMoreTokens()){
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException ignored){}
            }
            return st.nextToken();
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong() {
            return Long.parseLong(next());
        }
        public double nextDouble() {
            return Double.parseDouble(next());
        }
    }

    private static int binSearch(int []a, int l, int r, int x){
        if (l >= r) return -1;
        int m = (l + r) / 2;
        if (a[m] > x || (a[m] == x && m > 0 && a[m-1] == x)) {
            return binSearch(a, l, m, x);
        }
        else if (a[m] < x){
            return binSearch(a, m + 1, r, x);
        }
        return m;
    }

    private static int binSearch2(int []a, int l, int r, int x){
        if (l >= r) return l;
        int m = (l + r) / 2;
        if (a[m] > x) {
            return binSearch2(a, l, m, x);
        }
        else if (a[m] < x || (m < a.length - 1 && a[m+1] == x)){
            return binSearch2(a, m + 1, r, x);
        }
        return m + 1;
    }

    private static int binSearch3(int []a, int l, int r, int x){
        if (l >= r) {
            if (a.length == 1){
                return 0;
            }
            else if (l >= a.length) {
                return a.length - 1;
            }
            else if (l-1 >=0) {
                int d1 = Math.abs(a[l-1] - x);
                int d2 = Math.abs(a[l] - x);
                if(d1 <= d2){
                    return l-1;
                }
                return l;
            }
            else {
                return l;
            }
        }
        int m = (l + r) / 2;
        if (a[m] > x) {
            return binSearch3(a, l, m, x);
        }
        else if (a[m] < x) {
            return binSearch3(a, m + 1, r, x);
        }
        return m;
    }

    private static int compareString(String a, String b){
        if(a.length() > b.length()){
            return 1;
        }
        else if(a.length() < b.length()){
            return -1;
        }
        for(int i=0;i<a.length();i++){
            if(a.charAt(i) > b.charAt(i)){
                return 1;
            }
            else if(a.charAt(i) < b.charAt(i)){
                return -1;
            }
        }
        return 0;
    }

    public static void main(String args[]){
        FastScanner scanner = new FastScanner(System.in);
        PrintWriter printer = new PrintWriter(System.out);
        int n = scanner.nextInt(), m = scanner.nextInt(), cl = scanner.nextInt(), ce = scanner.nextInt(), v = scanner.nextInt();
        int l[] = new int[cl];
        int e[] = new int[ce];
        if (cl > 0) {
            for (int i = 0; i < cl; i++) {
                l[i] = scanner.nextInt();
            }
        }
        if (ce > 0) {
            for (int i = 0; i < ce; i++) {
                e[i] = scanner.nextInt();
            }
        }
        int q = scanner.nextInt();
        for(int i=0;i<q;i++){
            int y1 = scanner.nextInt(), x1 = scanner.nextInt(), y2 = scanner.nextInt(), x2 = scanner.nextInt();
            if (y1 == y2){
                printer.println(Math.abs(x1 - x2));
            }
            else {
                int xd = (x1 + x2) / 2;

                int a1 = Integer.MAX_VALUE;
                if (cl > 0) {
                    int xl = l[binSearch3(l, 0, l.length, xd)];
                    a1 = Math.abs(xl - x1) + Math.abs(xl - x2) + Math.abs(y1 - y2);
                }

                int a2 = Integer.MAX_VALUE;
                if (ce > 0) {
                    int xe = e[binSearch3(e, 0, e.length, xd)];
                    a2 = Math.abs(xe - x1) + Math.abs(xe - x2) + Math.abs(y1 - y2) / v;
                    if (Math.abs(y1 - y2) % v != 0) a2++;
                }
                printer.println(Math.min(a1, a2));
            }
        }
        printer.close();
    }
}

