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.io.PrintStream;
import java.io.PrintWriter;
import java.io.Reader;
import java.io.StreamTokenizer;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.max;
import static java.lang.Math.min;


public class Main {
	//pray for this code//
	//static Scanner scan = new Scanner(System.in);
	//static PrintStream out = new PrintStream(System.out);
	static Reader r = new BufferedReader(new InputStreamReader(System.in));
	static StreamTokenizer in = new StreamTokenizer(r);
	static PrintWriter out = new PrintWriter(System.out);
    		
	
	
	public static void main (String[] args) throws IOException {
		
		int n = getNextInt();
		int m = getNextInt();
		int c_l = getNextInt();
		int c_e = getNextInt();
		int v = getNextInt();
		int[] l = new int[c_l];
		for (int i = 0; i < c_l; i++) l[i] = getNextInt();
		int[] e = new int[c_e];
		for (int i = 0; i < c_e; i++) e[i] = getNextInt();
		
		int q = getNextInt();
		for (int i = 0; i < q; i++) {
			// (x, y) -> (x_, y_)
			int x = getNextInt(); int y = getNextInt();
			int x_ = getNextInt(); int y_ = getNextInt();
			if (x == x_) {
				out.println(abs(y, y_));
				continue;
			}
			
			int minl = Integer.MAX_VALUE;
			if (c_l == 0) minl = Integer.MAX_VALUE;
			else {
				//find stairs
				int ind_left = 0, ind_right = 0;
				int find = Arrays.binarySearch(l, y);
				if (-1 * (find + 1) == 0) ind_left = -1;
				else ind_left = -1 * (find + 1) - 1;
				//if (-1 * (find + 1) == c_l) ind_left = c_l - 1;
				
				
				ind_right = ind_left + 1;
				if (ind_right == c_l) ind_right = -1;
                //out.println(ind_left + " " + ind_right);	
				
                if (ind_left != -1) {
					ind_left = l[ind_left];
					minl = min(minl, abs(ind_left, y) + abs(x, x_) + abs(y_, ind_left));
				}
				if (ind_right != -1) {
					ind_right = l[ind_right];
					//out.println("VAL " + ind_right + " " + x);
					minl = min(minl, abs(ind_right, y) + abs(x, x_) + abs(y_, ind_right));
					
				}
			}
			
			int mine = Integer.MAX_VALUE;
			if (c_e == 0) mine = Integer.MAX_VALUE;
			else {
				//find lift
				int ind_left = 0, ind_right = 0;
				
				/*
				for (int j = 0; j < c_e; j++) {
					ind_left = j;
					if (e[j] > y) {ind_left--; break;} 
				}*/
				
				int find = Arrays.binarySearch(e, y);
				if (-1 * (find + 1) == 0) ind_left = -1;
				else ind_left = -1 * (find + 1) - 1;
				
				ind_right = ind_left + 1;
				if (ind_right == c_e) ind_right = -1;
                //out.println(ind_left + " " + ind_right);	
				
                if (ind_left != -1) {
					ind_left = e[ind_left];
					mine = min(mine, abs(ind_left, y) + liftmoves(abs(x, x_), v) + abs(y_, ind_left));
				}
				if (ind_right != -1) {
					ind_right = e[ind_right];
					//out.println("VAL " + ind_right + " " + x);
					mine = min(mine, abs(ind_right, y) + liftmoves(abs(x, x_), v) + abs(y_, ind_right));
				}
			}
			
			
			out.println(min(mine, minl));
		}
	    out.flush();

	}
	
	static int liftmoves(int a, int c) {
		if (a % c == 0) return a / c;
		return a / c + 1;
	}
	
	static int abs (int a, int b) {
		return Math.abs(a - b);
	}
	
	static int getNextInt () throws IOException {
		in.nextToken();
		return (int) in.nval;
	}
	
	
}