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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @author Don Li
 */
public class StairsAndElevators {
    
    int INF = (int) 1e9;
    
    int n, m, num_stairs, num_elevators, v;
    int[] stairs, elevators;
    
    void solve() {
        n = in.nextInt(); m = in.nextInt();
        num_stairs = in.nextInt(); num_elevators = in.nextInt(); v = in.nextInt();
        stairs = new int[num_stairs];
        for (int i = 0; i < num_stairs; i++) stairs[i] = in.nextInt() - 1;
        elevators = new int[num_elevators];
        for (int i = 0; i < num_elevators; i++) elevators[i] = in.nextInt() - 1;
        
        int Q = in.nextInt();
        while (Q-- > 0) {
            int x1 = in.nextInt() - 1, y1 = in.nextInt() - 1, x2 = in.nextInt() - 1, y2 = in.nextInt() - 1;
            if (x1 == x2) {
                int ans = Math.abs(y1 - y2);
                out.println(ans);
            } else {
                int ans = INF;
                if (num_elevators > 0) ans = Math.min(ans, cost_use_elevator(x1, y1, x2, y2));
                if (num_stairs > 0) ans = Math.min(ans, cost_use_stair(x1, y1, x2, y2));
                out.println(ans);
            }
        }
    }
    
    int cost_use_elevator(int x1, int y1, int x2, int y2) {
        if (y1 > y2) {
            return cost_use_elevator(x2, y2, x1, y1);
        }
        
        int p = lowerBound(elevators, y1), q = lowerBound(elevators, y2);
        if (p < q) {
            return (Math.abs(x1 - x2) + v - 1) / v + (y2 - y1);
        } else {
            int cost = INF;
            if (p < num_elevators) {
                cost = Math.min(cost, (Math.abs(x1 - x2) + v - 1) / v + elevators[p] - y1 + elevators[p] - y2);
            }
            if (p - 1 >= 0) {
                cost = Math.min(cost, (Math.abs(x1 - x2) + v - 1) / v + y1 - elevators[p - 1] + y2 - elevators[p - 1]);
            }
            return cost;
        }
    }
    
    int cost_use_stair(int x1, int y1, int x2, int y2) {
        if (y1 > y2) {
            return cost_use_stair(x2, y2, x1, y1);
        }
        
        int p = lowerBound(stairs, y1), q = lowerBound(stairs, y2);
        if (p < q) {
            return Math.abs(x1 - x2) + (y2 - y1);
        } else {
            int cost = INF;
            if (p < num_elevators) {
                cost = Math.min(cost, Math.abs(x1 - x2) + stairs[p] - y1 + stairs[p] - y2);
            }
            if (p - 1 >= 0) {
                cost = Math.min(cost, Math.abs(x1 - x2) + y1 - stairs[p - 1] + y2 - stairs[p - 1]);
            }
            return cost;
        }
    }
    
    int lowerBound(int[] a, int k) {
        int lb = -1, ub = a.length;
        while (ub - lb > 1) {
            int mid = (lb + ub) >> 1;
            if (a[mid] >= k) ub = mid;
            else lb = mid;
        }
        return ub;
    }
    
    public static void main(String[] args) {
        in = new FastScanner(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(System.out);
        new StairsAndElevators().solve();
        out.close();
    }
    
    static FastScanner in;
    static PrintWriter out;
    
    static class FastScanner {
        BufferedReader in;
        StringTokenizer st;
        
        public FastScanner(BufferedReader in) {
            this.in = in;
        }
        
        public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        
        public int nextInt() {
            return Integer.parseInt(nextToken());
        }
        
        public long nextLong() {
            return Long.parseLong(nextToken());
        }
        
        public double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
}
