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

public class StairsAndElevators{

    static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new InputStreamReader(System.in)); 
        } 
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    }
    public static PrintWriter out;
    public static void printArr(int[] arr){
        for(int i = 0;i<arr.length;i++){
            out.print(arr[i] + " ");
        }
        out.println();
    }
    public static void main(String[] args){
        FastReader s = new FastReader();
        out=new PrintWriter (new BufferedOutputStream(System.out));
        int t = 1;
        for(int u = 0;u<t;u++){
            int n = s.nextInt();
            int m = s.nextInt();
            int stairCases = s.nextInt();
            int ele = s.nextInt();
            int v = s.nextInt();
            // int[] stairs = new int[stairCases];
            // int[] elevators = new int[ele];
            TreeSet<Integer> stairs = new TreeSet<>();
            TreeSet<Integer> elevators = new TreeSet<>();
            if(stairCases!=0){
                for(int i = 0;i<stairCases;i++){
                    stairs.add(s.nextInt());
                }
            }
            if(ele!=0){
                for(int i = 0;i<ele;i++){
                    elevators.add(s.nextInt());
                }
            }
            int q = s.nextInt();
            for(int g = 0;g<q;g++){
                int x1 = s.nextInt();
                int y1 = s.nextInt();
                int x2 = s.nextInt();
                int y2 = s.nextInt();
                int stairsMin = Integer.MAX_VALUE;
                int eleMin = Integer.MAX_VALUE;
                Integer rightStair = stairs.ceiling(y1);
                if(rightStair!=null){
                    stairsMin = Math.min(stairsMin, Math.abs(y1-rightStair) + Math.abs(y2-rightStair) + Math.abs(x1-x2));
                }
                Integer leftStair = stairs.floor(y1);
                if(leftStair!=null){
                    stairsMin = Math.min(stairsMin, Math.abs(y1-leftStair) + Math.abs(y2-leftStair) + Math.abs(x1-x2));
                }
                Integer rightLift = elevators.ceiling(y1);
                if(rightLift!=null){
                    eleMin = Math.min(eleMin, Math.abs(y1-rightLift) + Math.abs(y2-rightLift) + (int)Math.ceil(Math.abs(x1-x2)/(double)v));
                }
                Integer leftLift = elevators.floor(y1);
                if(leftLift!=null){
                    eleMin = Math.min(eleMin, Math.abs(y1-leftLift) + Math.abs(y2-leftLift) + (int)Math.ceil(Math.abs(x1-x2)/(double)v));
                }
                int ans = Math.min(stairsMin, eleMin);
                System.out.println(ans);
            }
        }
        out.close();
    }

}