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

public class R477C2 {
	public static void main(String[] args) {
		FastScanner scan=new FastScanner();
		PrintWriter out=new PrintWriter(System.out);
		int n=scan.nextInt();
		int m=scan.nextInt();
		int stairs=scan.nextInt(), elev=scan.nextInt(), speed=scan.nextInt();
		
		TreeSet<Integer> s=new TreeSet<>(), e=new TreeSet<>();
		for(int i=0;i<stairs;i++) {
			s.add(scan.nextInt());
		}
		if(stairs==0)scan.nextLine();
		for(int i=0;i<elev;i++) {
			e.add(scan.nextInt());
		}
		if(elev==0)scan.nextLine();
		
		int q=scan.nextInt();
		for(int i=0;i<q;i++) {
			int i1=scan.nextInt(), j1=scan.nextInt();
			int i2=scan.nextInt(), j2=scan.nextInt();
			int res=Integer.MAX_VALUE;
			if(i1==i2) res=Math.abs(j1-j2);
			
			Integer lowS=s.lower(j1), highS=s.higher(j1);
			Integer lowE=e.lower(j1), highE=e.higher(j1);
			
			if(lowS!=null) res=Math.min(res,Math.abs(j1-lowS)+Math.abs(i1-i2)+Math.abs(j2-lowS));
			if(highS!=null) res=Math.min(res,Math.abs(j1-highS)+Math.abs(i1-i2)+Math.abs(j2-highS));
			if(lowE!=null) res=Math.min(res,Math.abs(j1-lowE)+(int)Math.ceil(Math.abs(i1-i2)*1.0/speed)+Math.abs(j2-lowE));
			if(highE!=null) res=Math.min(res,Math.abs(j1-highE)+(int)Math.ceil(Math.abs(i1-i2)*1.0/speed)+Math.abs(j2-highE));
			
//			for(int j=0;j<stairs;j++) {
//				//System.out.println(Math.abs(j1-s[j])+" "+Math.abs(i1-i2)+" "+Math.abs(j2-s[j]));
//				res=Math.min(res,Math.abs(j1-s[j])+Math.abs(i1-i2)+Math.abs(j2-s[j]));
//			}
//			for(int j=0;j<elev;j++) {
//				res=Math.min(res,Math.abs(j1-e[j])+(int)Math.ceil(Math.abs(i1-i2)*1.0/speed)+Math.abs(j2-e[j]));
//			}
			out.println(res);
		}
		out.close();
	}
	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner() {
			try	{
				br = new BufferedReader(new InputStreamReader(System.in));
				st = new StringTokenizer(br.readLine());
			} catch (Exception e){e.printStackTrace();}
		}

		public String next() {
			if (st.hasMoreTokens())	return st.nextToken();
			try {st = new StringTokenizer(br.readLine());}
			catch (Exception e) {e.printStackTrace();}
			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 String nextLine() {
			String line = "";
			if(st.hasMoreTokens()) line = st.nextToken();
			else try {return br.readLine();}catch(IOException e){e.printStackTrace();}
			while(st.hasMoreTokens()) line += " "+st.nextToken();
			return line;
		}
	}
}
/*
5 6 1 1 3
2
5
3
1 1 5 6
1 3 5 4
3 3 5 3

5 6 0 1 3

5
3
1 1 5 6
1 3 5 4
3 3 5 3

5 6 1 0 3
2

3
1 1 5 6
1 3 5 4
3 3 5 3

5 6 0 0 3


3
1 1 5 6
1 3 5 4
3 3 5 3
*/