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.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.*;

public class C {
	
	static int N, M, ST, EL, V;
	static TreeSet<Integer> stairs = new TreeSet<Integer>();
	static TreeSet<Integer> eles = new TreeSet<Integer>();
	static int x1,y1,x2,y2;
	public static void main(String[] args) {
		JS in = new JS();
		N = in.nextInt();
		M = in.nextInt();
		ST = in.nextInt();
		EL = in.nextInt();
		V = in.nextInt();
		for(int i = 0; i < ST; i++) {
			stairs.add(in.nextInt()-1);
		}
		for(int i = 0; i < EL; i++) {
			eles.add(in.nextInt()-1);
		}
		
		int Q = in.nextInt();
		for(int q = 0; q < Q; q++) {
			y1 = in.nextInt()-1;
			x1 = in.nextInt()-1;
			y2 = in.nextInt()-1;
			x2 = in.nextInt()-1;
			int best = Integer.MAX_VALUE;
			best = Math.min(best, stairLeft());
			best = Math.min(best, stairRight());
			best = Math.min(best, eleLeft());
			best = Math.min(best, eleRight());
			if(y1==y2) best = Math.min(best, Math.abs(x1-x2));
			System.out.println(best);
		}
		
		
	}
	
	static int stairLeft() {
		int res = 0;
		if(stairs.lower(x1) == null) return Integer.MAX_VALUE;
		int loc = stairs.lower(x1);
		res += x1-loc;
		res += Math.abs(y2-y1);
		res += Math.abs(x2-loc);
		return res;
	}
	static int stairRight() {
		int res = 0;
		if(stairs.higher(x1) == null) return Integer.MAX_VALUE;
		int loc = stairs.higher(x1);
		res += loc-x1;
		res += Math.abs(y2-y1);
		res += Math.abs(x2-loc);

		return res;
	}
	static int eleLeft() {
		int res = 0;
		if(eles.lower(x1) == null) return Integer.MAX_VALUE;
		int loc = eles.lower(x1);
		res += x1-loc;
		int dy = Math.abs(y2-y1);
		int eleD = dy/V;
		if(dy%V != 0) eleD++;
		res += eleD;
		res += Math.abs(x2-loc);
		return res;
	}
	static int eleRight() {
		int res = 0;
		if(eles.higher(x1) == null) return Integer.MAX_VALUE;
		int loc = eles.higher(x1);
		res += loc-x1;
		int dy = Math.abs(y2-y1);
		int eleD = dy/V;
		if(dy%V != 0) eleD++;
		res += eleD;
		res += Math.abs(x2-loc);
		return res;
	}

	
	static class JS{
		public int BS = 1<<16;
		public char NC = (char)0;
		byte[] buf = new byte[BS];
		int bId = 0, size = 0;
		char c = NC;
		double num = 1;
		BufferedInputStream in;
		
		public JS() {
			in = new BufferedInputStream(System.in, BS);
		}
		
		public JS(String s) throws FileNotFoundException {
			in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
		}
		
		public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}				
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		}
		
		public int nextInt() {
			return (int)nextLong();
		}
		
		public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		}
		
		public double nextDouble() {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		}
		
		public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}
		
		public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		}
	}
	
}
