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.Arrays;
import java.util.StringTokenizer;

public class C {
static int v;
public static long dist (int i1,int j1,int i2,int j2,int x,int stairs)
{
	int ans=Math.abs(x-j1);
	if(stairs==1)
	{
		ans+=Math.abs(i2-i1);
	}
	else
	{
		int floors=Math.abs(i2-i1);
		ans+=(v+floors-1)/v;
	}
	ans+=Math.abs(x-j2);
	return ans;
}
public static int rightSearch(int x,int []a)
{
	int lo=0;
	int hi=a.length-1;
	int ans=-1;
	while(lo<=hi)
	{
		int mid=(lo+hi)/2;
		if(a[mid]<=x)
			lo=mid+1;
		else
		{
			ans=a[mid];
			hi=mid-1;
		}
	}
	return ans;
}
public static int leftSearch(int x,int []a)
{
	int lo=0;
	int hi=a.length-1;
	int ans=-1;
	while(lo<=hi)
	{
		int mid=(lo+hi)/2;
		if(a[mid]>x)
			hi=mid-1;
		else
		{
			ans=a[mid];
			lo=mid+1;
		}
	}
	return ans;
}
	public static void main(String[] args) throws IOException {
		Scanner sc=new Scanner(System.in);
		PrintWriter pw=new PrintWriter(System.out);
		int n=sc.nextInt(),m=sc.nextInt(),cl=sc.nextInt(),ce=sc.nextInt();
		v=sc.nextInt();
		int [] stairs=new int [cl];
		int []elev=new int [ce];
		for(int i=0;i<cl;i++)
			stairs[i]=sc.nextInt()-1;
		for(int i=0;i<ce;i++)
			elev[i]=sc.nextInt()-1;
		/*int [][]a=new int [n][m];
		for(int i=0;i<cl;i++)
		{
			int x=sc.nextInt()-1;
			for(int j=0;j<n;j++)
				a[j][x]=1;
		}
		for(int i=0;i<cl;i++)
		{
			int x=sc.nextInt()-1;
			for(int j=0;j<n;j++)
				a[j][x]=2;
		}
		for(int i=0;i<n;i++)
			System.out.println(Arrays.toString(a[i]));
		*/
		int q=sc.nextInt();
		while(q-->0)
		{
			int i1=sc.nextInt()-1,j1=sc.nextInt()-1,i2=sc.nextInt()-1,j2=sc.nextInt()-1;
			long ans=Long.MAX_VALUE;
			int x=leftSearch(j1,stairs);
			if(x!=-1)
			{
				ans=Math.min(ans, dist(i1, j1, i2, j2, x,1));
			}
			x=rightSearch(j1,stairs);
			if(x!=-1)
			{
				ans=Math.min(ans, dist(i1, j1, i2, j2, x,1));
			}
			x=leftSearch(j1,elev);
			if(x!=-1)
			{
				ans=Math.min(ans, dist(i1, j1, i2, j2, x,2));
			}
			x=rightSearch(j1,elev);
			if(x!=-1)
			{
				ans=Math.min(ans, dist(i1, j1, i2, j2, x,2));
			}
			
			pw.println(ans);
		}
		pw.close();

	}
	static class Scanner
	{
		BufferedReader br;
		StringTokenizer st;
		public Scanner(InputStream s)
		{
			br=new BufferedReader(new InputStreamReader(s));
		}
		public String nextLine() throws IOException
		{
			return br.readLine();
		}
		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 double nextDouble() throws IOException
		{
			return Double.parseDouble(next());
		}
		public boolean ready() throws IOException
		{
			return br.ready();
		}
		public long nextLong() throws IOException
		{
			return Long.parseLong(next());
		}
	}
}