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.lang.*;
public class CF967C {
    public static void main(String args[]) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split(" ");
        int n = Integer.parseInt(s[0]);
        int m = Integer.parseInt(s[1]);
        int n_s = Integer.parseInt(s[2]);
        int n_e = Integer.parseInt(s[3]);
        int v = Integer.parseInt(s[4]);

        int[] stairs = new int[n_s];
        int[] ele = new int[n_e];

        s = br.readLine().split(" ");
        for(int i=0;i<n_s;i++){
            stairs[i] = Integer.parseInt(s[i]);
            stairs[i]--;
        }

        s = br.readLine().split(" ");
        for(int i=0;i<n_e;i++){
            ele[i] = Integer.parseInt(s[i]);
            ele[i]--;
        }

        StringBuffer sb = new StringBuffer();

        int q = Integer.parseInt(br.readLine());
        for(int i=0;i<q;i++){
            //For each query
            s = br.readLine().split(" ");
            int x1 = Integer.parseInt(s[0]);
            int y1 = Integer.parseInt(s[1]);
            int x2 = Integer.parseInt(s[2]);
            int y2 = Integer.parseInt(s[3]);

            x1--;
            y1--;
            x2--;
            y2--;

            //Find nearest stairs from y1
            int low = 0, high = n_s - 1;
            while(low < high){
                int mid = (low+high)/2;
                if(low == mid){
                    break;
                }
                if(stairs[mid] > y1){
                    high = mid;
                }else{
                    low = mid;
                }
            }

            //Find Nearest Elevators
            int low1 = 0, high1 = n_e - 1;
            while(low1 < high1){
                int mid = (low1+high1)/2;
                if(low1 == mid){
                    break;
                }
                if(ele[mid] > y1){
                    high1 = mid;
                }else{
                    low1 = mid;
                }
            }


            //Find times
            if(low == high && low+1 < n_s){
                high = low + 1;
            }

            if(low1 == high1 && low1+1 < n_e){
                high1 = low1 + 1;
            }
            //Stairs 1

            long st1 = Integer.MAX_VALUE, st2 = Integer.MAX_VALUE;
            if(n_s > 0){
                st1 = (long)Math.abs(x2 - x1);
                //y1 --> low
                st1 += (long)Math.abs(y1 - stairs[low]);
                st1 += (long)Math.abs(stairs[low] - y2);

                //Stairs 2

                st2 = (long)Math.abs(x2 - x1);
                //y1 --> high
                st2 += (long)Math.abs(y1 - stairs[high]);
                st2 += (long)Math.abs(stairs[high] - y2);
            }

            //Elevator 1
            long e1 = Integer.MAX_VALUE, e2 = Integer.MAX_VALUE;
            if(n_e > 0){
                e1 = (long)Math.ceil((Math.abs(x2 - x1))/(1.0 * v));
                //y1 --> low1
                e1 += (long)Math.abs(y1 - ele[low1]);
                e1 += (long)Math.abs(ele[low1] - y2);

                //Elevator 2
                e2 = (long)Math.ceil((Math.abs(x2 - x1))/(1.0 * v));
                //y1 --> low1
                e2 += (long)Math.abs(y1 - ele[high1]);
                e2 += (long)Math.abs(ele[high1] - y2);
            }



            long e = Math.min(e1, e2);
            long str = Math.min(st1, st2);

            if(x1 == x2){
                sb.append((long)Math.abs(x1 - x2) +"\n");
                continue;
            }

            sb.append(Math.min(e, str) + "\n");
        }

        System.out.println(sb);
    }
}
