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

//import javax.print.attribute.IntegerSyntax; 
 public class test{
	 public static void swap(int a,int b){
		 int c = a;
		 a = b;
		 b = c;
	 }
	 
	 public static void main(String[] args) throws IOException{
		 //Scanner in = new Scanner(System.in);
		 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

         StringTokenizer st = new StringTokenizer(br.readLine());
         int n = Integer.parseInt(st.nextToken());
         int m = Integer.parseInt(st.nextToken());
         int cl = Integer.parseInt(st.nextToken());
         int ce = Integer.parseInt(st.nextToken());
         int v = Integer.parseInt(st.nextToken());
         TreeSet<Integer> stairs = new TreeSet<Integer>();
         TreeSet<Integer> elevators = new TreeSet<Integer>();
         st = new StringTokenizer(br.readLine());
         for(int i = 0;i<cl;i++){
        	 int a = Integer.parseInt(st.nextToken());
        	 stairs.add(a);
         }
         st = new StringTokenizer(br.readLine());
         for(int i = 0;i<ce;i++){
        	 int a = Integer.parseInt(st.nextToken());
        	 elevators.add(a);
         }
         int q = Integer.parseInt(br.readLine());
         for(int i = 0;i<q;i++){
        	 st = new StringTokenizer(br.readLine());
        	 int x1 = Integer.parseInt(st.nextToken());
        	 int y1 = Integer.parseInt(st.nextToken());
        	 int x2 = Integer.parseInt(st.nextToken());
        	 int y2 = Integer.parseInt(st.nextToken());
        	 if(x1 == x2){
        		 System.out.println(Math.abs(y2-y1));
        		 continue;
        	 }
        	 else{
        		 int ans1, ans2,ans3,ans4;
        		 ans1 = ans2 = ans3 = ans4 = Integer.MAX_VALUE;
        		 
        		 // taking the right stairs
        		 Integer a = stairs.ceiling(y1);
        		 if(a != null){
        			 ans1 = Math.abs(y1 - a) + Math.abs(y2 - a) + Math.abs(x1 - x2);
        		 }
        		 // taking the left stairs
        		 a = stairs.floor(y1);
        		 if(a != null){ 
        			 ans2 = Math.abs(y1 - a) + Math.abs(y2 - a) + Math.abs(x1 -x2);
        			 if(ans2 < ans1)
        				 ans1 = ans2;
        		 }
        		 
        		 // taking the right lift
        		 a = elevators.ceiling(y1);
        		 if(a != null){
        			 ans3 = Math.abs(y1-a) + Math.abs(y2 - a) + (int)Math.ceil(Math.abs(x1-x2)/(double)v);
        		 }
        		 
        		 // taking the left lift
        		 a = elevators.floor(y1);
        		 if( a != null){
        			 ans4 = Math.abs(y1-a) + Math.abs(y2 -a) + (int)Math.ceil(Math.abs(x1-x2)/(double) v);
        			 if(ans4 < ans3)
        				 ans3 = ans4;
        		 }
        		 System.out.println(Math.min(ans1, ans3));
        	 }
         }
	 }
 }