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

public class zizo {

	public static void main(String[]args) throws IOException {
		Scanner zizo =new Scanner(System.in);
		PrintWriter wr=new PrintWriter(System.out);
		int n=zizo.nextInt();
		int m=zizo.nextInt();
		int cl=zizo.nextInt();
		int ce=zizo.nextInt();
		int v=zizo.nextInt();
		TreeSet<Integer>l=new TreeSet<>();
		TreeSet<Integer>e=new TreeSet<>();
		for(int i=0;i<cl;i++) {
			l.add(zizo.nextInt());
		}
		for(int i=0;i<ce;i++) {
			e.add(zizo.nextInt());
		}
		int q=zizo.nextInt();
		for(int p=0;p<q;p++) {
			int y1=zizo.nextInt();
			int x1=zizo.nextInt();
			int y2=zizo.nextInt();
			int x2=zizo.nextInt();
			if(y1==y2) {
				wr.println(Math.abs(x1-x2));
				continue;
			}
			int r=Integer.MAX_VALUE;
			if(e.ceiling(x1)!=null && e.floor(x1)!=null) {
				r=Math.min(r,Math.abs(x1-e.ceiling(x1))+Math.abs(x2-e.ceiling(x1))+(int)Math.ceil((y2-y1)/(1.0*v)));
				r=Math.min(r,Math.abs(x1-e.floor(x1))+Math.abs(x2-e.floor(x1))+(int)Math.ceil((y2-y1)/(1.0*v)));
			}
			else if(e.ceiling(x1)==null && e.floor(x1)!=null)	
				r=Math.min(r,Math.abs(x1-e.floor(x1))+Math.abs(x2-e.floor(x1))+(int)Math.ceil((y2-y1)/(1.0*v)));
			else if(e.floor(x1)==null && e.ceiling(x1)!=null)			
				r=Math.min(r,Math.abs(x1-e.ceiling(x1))+Math.abs(x2-e.ceiling(x1))+(int)Math.ceil((y2-y1)/(1.0*v)));
			//System.out.println(r);

			if(l.ceiling(x1)!=null && l.floor(x1)!=null) {
				//System.out.println(1);	
				r=Math.min(r,Math.abs(x1-l.ceiling(x1))+Math.abs(x2-l.ceiling(x1))+(y2-y1));
				r=Math.min(r,Math.abs(x1-l.floor(x1))+Math.abs(x2-l.floor(x1))+(y2-y1));
			}
			else if(l.ceiling(x1)==null && l.floor(x1)!=null) {	
				//System.out.println(2);
				r=Math.min(r,Math.abs(x1-l.floor(x1))+Math.abs(x2-l.floor(x1))+Math.abs(y2-y1));}
			else if(l.floor(x1)==null && l.ceiling(x1)!=null) {
				
				//System.out.println(3);
				r=Math.min(r,Math.abs(x1-l.ceiling(x1))+Math.abs(x2-l.ceiling(x1))+Math.abs(y2-y1));
			}
			wr.println(r);

		}
		wr.close();
	}
}

class Scanner {
	StringTokenizer st;
	BufferedReader br;

	public Scanner(InputStream s) {
		br = new BufferedReader(new InputStreamReader(s));
	}

	public String next() throws IOException {
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(next());
	}

	public String nextLine() throws IOException {
		return br.readLine();
	}

	public double nextDouble() throws IOException {
		String x = next();
		StringBuilder sb = new StringBuilder("0");
		double res = 0, f = 1;
		boolean dec = false, neg = false;
		int start = 0;
		if (x.charAt(0) == '-') {
			neg = true;
			start++;
		}
		for (int i = start; i < x.length(); i++)
			if (x.charAt(i) == '.') {
				res = Long.parseLong(sb.toString());
				sb = new StringBuilder("0");
				dec = true;
			} else {
				sb.append(x.charAt(i));
				if (dec)
					f *= 10;
			}
		res += Long.parseLong(sb.toString()) / f;
		return res * (neg ? -1 : 1);
	}

	public boolean ready() throws IOException {
		return br.ready();
	}
}