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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.TreeSet;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author pandusonu
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}

	static class TaskC {
		public void solve(int testNumber, InputReader in, PrintWriter out) {
			// out.print("Case #" + testNumber + ": ");
			int n = in.readInt();
			int m = in.readInt();
			int cl = in.readInt();
			int ce = in.readInt();
			int v = in.readInt();
			TreeSet<Integer> stairs = new TreeSet<>();
			TreeSet<Integer> ele = new TreeSet<>();
			for (int i = 0; i < cl; i++) {
				stairs.add(in.readInt());
			}
			for (int i = 0; i < ce; i++) {
				ele.add(in.readInt());
			}
			int q = in.readInt();
			for (int i = 0; i < q; i++) {
				int[] a = in.readIntArray(4);
				Integer entry;
				// if same floor
				if (a[0] == a[2]) {
					out.println(Math.max(a[1], a[3]) - Math.min(a[1], a[3]));
					continue;
				}
				int ans1, ans2, ans3, ans4;
				ans1 = ans2 = ans3 = ans4 = Integer.MAX_VALUE;
				// take right stairs
				entry = stairs.ceiling(a[1]);
				if (entry != null) {
					ans1 = Math.abs(a[1] - entry) + Math.abs(a[3] - entry) + Math.abs(a[0] - a[2]);
				}
				entry = stairs.floor(a[1]);
				if (entry != null) {
					ans2 = Math.abs(a[1] - entry) + Math.abs(a[3] - entry) + Math.abs(a[0] - a[2]);
				}
				// taking lift
				entry = ele.ceiling(a[1]);
				if (entry != null) {
					ans3 = Math.abs(a[1] - entry) + Math.abs(a[3] - entry) + (int) Math.ceil(Math.abs(a[0] - a[2]) / (v * 1.0));
				}
				entry = ele.floor(a[1]);
				if (entry != null) {
					ans4 = Math.abs(a[1] - entry) + Math.abs(a[3] - entry) + (int) Math.ceil(Math.abs(a[0] - a[2]) / (v * 1.0));
				}
				out.println(Math.min(Math.min(ans1, ans2), Math.min(ans3, ans4)));
			}
		}

	}

	static class InputReader {
		private final InputStream stream;
		private final byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		private int read() {
			try {
				if (curChar >= numChars) {
					curChar = 0;
					numChars = stream.read(buf);
					if (numChars <= 0)
						return -1;
				}
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
			return buf[curChar++];
		}

		public int readInt() {
			return (int) readLong();
		}

		public long readLong() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
				if (c == -1) throw new RuntimeException();
			}
			boolean negative = false;
			if (c == '-') {
				negative = true;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9') throw new InputMismatchException();
				res *= 10;
				res += (c - '0');
				c = read();
			} while (!isSpaceChar(c));
			return negative ? (-res) : (res);
		}

		public int[] readIntArray(int size) {
			int[] arr = new int[size];
			for (int i = 0; i < size; i++) arr[i] = readInt();
			return arr;
		}

		private boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

	}
}

