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.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;

public class Main {
    static InputReader in;
    static PrintWriter out;
    static long TIME_START = 0;
    static int cas = 0;
    static double eps = 1e-8;
    static int mod = (int) 1e9 + 9;
    static int inf = 0x3f3f3f3f;
    static long inff = 0x3f3f3f3f3f3f3f3fL;
    static int maxn = (int) 5000 + 5;


    static void solve() {
        while (in.hasNext()) {
            int n = in.nextInt();
            int m = in.nextInt();
            int cl = in.nextInt();
            int ce = in.nextInt();
            int v = in.nextInt();

            int[] l = cl == 0 ? null : in.nextIntArray(cl);
            int[] e = ce == 0 ? null : in.nextIntArray(ce);

            int q = in.nextInt();
            while (q-- > 0) {
                int x1 = in.nextInt();
                int y1 = in.nextInt();
                int x2 = in.nextInt();
                int y2 = in.nextInt();

                long ans = cl == 0 && ce == 0 ? Math.abs(x1 - x2) + Math.abs(y1 - y2) : inff;

                int l_l = lower(l, y1);
                int r_l = upper(l, y1);

                int l_e = lower(e, y1);
                int r_e = upper(e, y1);

                ans = Math.min(ans, l_l == -1 ? inff : (long)Math.abs(x1 - x2) + Math.abs(y1 - l[l_l]) + Math.abs(y2 - l[l_l]));
                ans = Math.min(ans, r_l == -1 ? inff : (long)Math.abs(x1 - x2) + Math.abs(y1 - l[r_l]) + Math.abs(y2 - l[r_l]));
                ans = Math.min(ans, l_e == -1 ? inff : (long)(Math.abs(x1 - x2) + v - 1) / v + (long)Math.abs(y1 - e[l_e]) + Math.abs(y2 - e[l_e]));
                ans = Math.min(ans, r_e == -1 ? inff : (long)(Math.abs(x1 - x2) + v - 1) / v + (long)Math.abs(y1 - e[r_e]) + Math.abs(y2 - e[r_e]));
                out.println(ans);
            }
        }
    }

    static int lower(int[] arr, int k) {
        if (arr == null) return -1;
        int l = 0, r = arr.length - 1, m, ans = 0;
        while (l <= r) {
            m = (l + r) / 2;
            if (arr[m] <= k) {
                ans = m;
                l = m + 1;
            } else {
                r = m - 1;
            }
        }
        return ans;
    }

    static int upper(int[] arr, int k) {
        if (arr == null) return -1;
        int l = 0, r = arr.length - 1, m, ans = 0;
        while (l <= r) {
            m = (l + r) / 2;
            if (arr[m] >= k) {
                ans = m;
                r = m - 1;
            } else {
                l = m + 1;
            }
        }
        return ans;
    }


    static void swap(int[] arr, int i, int j) {
        if (arr[i] != arr[j]) {
            arr[i] ^= arr[j];
            arr[j] ^= arr[i];
            arr[i] ^= arr[j];
        }
    }

    static void reverse(int[] arr, int i, int j) {
        while (i < j) {
            swap(arr, i++, j--);
        }
    }

    public static void main(String[] args) {
        openIO();
        solve();
        closeIO();
    }

    static void openIO() {
        try {
            TIME_START = 0;
            FileInputStream fi = new FileInputStream("night_input");
            System.setIn(fi);
            TIME_START = System.currentTimeMillis();
        } catch (Exception ex) {
            //hello night_13
        }

        in = new InputReader(System.in);
        out = new PrintWriter(System.out);
    }

    static void closeIO() {
        out.flush();

        if (TIME_START != 0) {
            out.println();
            out.print("time cost: ");
            out.print(System.currentTimeMillis() - TIME_START);
            out.println(" ms");
        }
        in.close();
        out.close();
    }
}


class InputReader {
    private BufferedReader br;
    private StringTokenizer st;

    public InputReader(InputStream stream) {
        br = new BufferedReader(new InputStreamReader(stream));
        eat("");
    }

    private void eat(String s) {
        st = new StringTokenizer(s);
    }

    public String nextLine() {
        try {
            return br.readLine();
        } catch (IOException e) {
            return null;
        }
    }

    public boolean hasNext() {
        while (!st.hasMoreTokens()) {
            String s = nextLine();
            if (s == null) return false;
            eat(s);
        }
        return true;
    }

    public String next() {
        hasNext();
        return st.nextToken();
    }

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

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

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

    public BigInteger nextBigInteger() {
        return new BigInteger(next());
    }

    public BigDecimal nextBigDecimal() {
        return new BigDecimal(next());
    }

    public int[] nextIntArray(int n) {
        int[] arr = new int[n];
        for (int i = 0; i < n; ++i) {
            arr[i] = nextInt();
        }
        return arr;
    }

    public double[] nextDoubleArray(int n) {
        double[] arr = new double[n];
        for (int i = 0; i < n; ++i) {
            arr[i] = nextDouble();
        }
        return arr;
    }

    public char[] nextCharArray() {
        return next().toCharArray();
    }

    public int[] nextIntArray(int n, int st) {
        n += st;
        int[] arr = new int[n];
        for (int i = st; i < n; ++i) {
            arr[i] = nextInt();
        }
        return arr;
    }

    public double[] nextDoubleArray(int n, int st) {
        n += st;
        double[] arr = new double[n];
        for (int i = st; i < n; ++i) {
            arr[i] = nextDouble();
        }
        return arr;
    }

    public char[] nextCharArray(int st) {
        String temp = "";
        while (st-- > 0) temp += " ";
        return (temp + next()).toCharArray();
    }

    public void close() {
        try {
            br.close();
        } catch (IOException e) {
        }
    }
}