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.util.*;
import java.io.*;

// Main

public class Main 
{    
  public static void main (String[] argv) 
  {
	  new Main();
  } 
  
  boolean test = false;
  public Main() {
	  FastReader in = new FastReader(new BufferedReader(new InputStreamReader(System.in)));
	  //FastReader in = new FastReader(new BufferedReader(new FileReader("Main.in")));
      int n = in.nextInt();      
      int m = in.nextInt(); 
      int nstairs = in.nextInt(); 
      int nelevators = in.nextInt(); 
      int v = in.nextInt();
      
      int[] stairs = new int[nstairs];
      
      if (nstairs == 0)
          in.nextLine();
      else {
        for (int i = 0; i < nstairs; i++) stairs[i] = in.nextInt();
      }
      
      int[] elevators = new int[nelevators];
      if (nelevators == 0) {
          in.nextLine();
      }else {
          for (int i = 0; i < nelevators; i++) elevators[i] = in.nextInt();
      }
      
      StringBuilder sb = new StringBuilder();
      int q = in.nextInt();
      for (int a0 = 0; a0 < q; a0++) {
          int y1 = in.nextInt();
          int x1 = in.nextInt();
          int y2 = in.nextInt();
          int x2 = in.nextInt();
          
          if (y1 == y2) {
              //same floor
              int dx = x1 - x2;
              if (dx < 0) dx = -dx;
              sb.append(dx + "\n");
          }else {
              //two options: stair or elevator
              int time = Integer.MAX_VALUE;
              if (nstairs > 0)
                time = process(stairs, x1, x2) + (y1 > y2 ? y1 - y2 : y2 - y1);
              if (nelevators > 0)
                time = Math.min(time, process(elevators, x1, x2) + (y1 > y2 ? (y1 - y2 + v - 1) / v : (y2 - y1 + v - 1) / v));
                          
              sb.append(time + "\n");
          }
      }      
      System.out.println(sb);
  }
  
  
  private int process(int[] a, int x1, int x2) {
    
    if(x1 > x2) {
        int t = x1;
        x1 = x2;
        x2 = t;
    }
      
    int n = a.length;
    int l = a[0];
    int r = a[n-1];
    
    if (x2 < l) return l - x1 + l - x2;
    if (x1 > r) return x1 + x2 - r - r;
    
    int i1 = -Arrays.binarySearch(a, x1) - 1;
    int i2 = -Arrays.binarySearch(a, x2) - 1;
    
    if (i1 != i2) return x2 - x1;
    
    //go left or right?
    return Math.min(x1 + x2 - 2 * a[i1 - 1], 2 * a[i1] - x1 - x2);    
  }  
  
  static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;
 
        public FastReader(BufferedReader in)
        {            
            br = in;
        }
 
        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    String line = br.readLine();
                    if (line == null || line.length() == 0) return "";
                    st = new StringTokenizer(line);
                }
                catch (IOException  e)
                {
                    return "";
                    //e.printStackTrace();
                }
            }
            return st.nextToken();
        }
 
        int nextInt()
        {
            return Integer.parseInt(next());
        }
 
        long nextLong()
        {
            return Long.parseLong(next());
        }
 
        double nextDouble()
        {
            return Double.parseDouble(next());
        }
 
        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                return "";
                //e.printStackTrace();
            }
            return str;
        }
    }
}