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.*; 
import java.text.DecimalFormat;

public class Main{
    final long mod = 163577857, IINF = (long)1e19;
    final int MAX = (int)1e6+1, MX = (int)1e7+1, INF = (int)1e9;
    DecimalFormat df = new DecimalFormat("0.00000000");
    FastReader in;
    PrintWriter out;
    boolean multipleTC = false;
 
    public static void main(String[] args) throws Exception{
        new Thread(null, new Runnable() {
            public void run(){
                try{new Main().run();}catch(Exception e){e.printStackTrace();}
            }
        }, "1", 1 << 26).start();
    }
    
    void run() throws Exception{
        in = new FastReader();
        out = new PrintWriter(System.out);
        for(int i = 1, t = (multipleTC)?ni():1; i<=t; i++)solve(i);
        out.flush();    
        out.close();
    }
    
    void solve(int TC) throws Exception{
        int n = ni(), m = ni(), cs = ni(), ce = ni(), v = ni();
        int[] st = new int[cs], el = new int[ce];
        for(int i = 0; i< cs; i++)st[i] = ni();
        for(int i = 0; i< ce; i++)el[i] = ni();
//        int[][] prev = new int[m+1][2], next = new int[m+1][2];
//        int p1 = -1, p2 = -1;
//        for(int i = 1; i<=m; i++){
//            if(p1+1<cs && st[p1+1]==i)p1++;
//            if(p2+1<ce && el[p2+1]==i)p2++;
//            prev[i] = new int[]{p1,p2};
//        }
//        p1 = cs;p2 = ce;
//        for(int i = m, j = cs-1, k = ce-1; i>=1; i--){
//            if(p1>0 && st[p1-1] == i)p1--;
//            if(p2>0 && el[p2-1] == i)p2--;
//            next[i] = new int[]{p1,p2};
//        }
        for(int q = ni(); q>0; q--){
            int x1 = ni(), y1 = ni(), x2 = ni(), y2 = ni();
            if(x1==x2){
                pn(Math.abs(y1-y2));
                continue;
            }
            int fd = Math.abs(x1-x2);
            long ans = IINF;
            int pre = smaller(st, y1), nex = larger(st, y1);
            if(pre!=-1)ans = Math.min(ans, Math.abs(y1-pre)+fd+Math.abs(y2-pre));
            if(nex!=-1)ans = Math.min(ans, Math.abs(y1-nex)+fd+Math.abs(y2-nex));
            pre = smaller(el,y1);nex = larger(el,y1);
            fd = (fd+v-1)/v;
            if(pre!=-1)ans = Math.min(ans, Math.abs(y1-pre)+fd+Math.abs(y2-pre));
            if(nex!=-1)ans = Math.min(ans, Math.abs(y1-nex)+fd+Math.abs(y2-nex));
            pn(ans);
        }
    }
    
    int smaller(int[] ar, int x){
        if(ar.length==0 || ar[0]>x)return -1;
        if(ar[ar.length-1]< x)return ar[ar.length-1];
        int lo = 0, hi = ar.length-1;
        while(lo<hi){
            int mid = (lo+hi)>>1;
            if(ar[mid]<=x){
                if(mid == ar.length-1 || ar[mid+1]>x)return ar[mid];
                else lo = mid+1;
            }else hi = mid-1;
        }
        return ar[lo];
    }
    
    int larger(int[] ar, int x){
        if(ar.length == 0 || ar[ar.length-1]<x)return -1;
        if(ar[0]>x)return ar[0];
        int lo = 0, hi = ar.length-1;
        while(lo<=hi){
            int mid = (lo+hi)>>1;
            if(ar[mid] >= x){
                if(mid==0 || ar[mid-1]<x)return ar[mid];
                else hi = mid-1;
            }else lo = mid+1;
        }
        return ar[hi];
    }
    
    int[] reverse(int[] a){
        int[] o = new int[a.length];
        for(int i = 0; i< a.length; i++)o[i] = a[a.length-i-1];
        return o;   
    }
 
    int[] sort(int[] a){
        if(a.length==1)return a;
        int mid = a.length/2;
        int[] b = sort(Arrays.copyOfRange(a,0,mid)), c = sort(Arrays.copyOfRange(a,mid,a.length));
        for(int i = 0, j = 0, k = 0; i< a.length; i++){
            if(j<b.length && k<c.length){
                if(b[j]<c[k])a[i] = b[j++];
                else a[i] = c[k++];
            }else if(j<b.length)a[i] = b[j++];
            else a[i] = c[k++];
        }
        return a;
    }
 
    long[] sort(long[] a){
        if(a.length==1)return a;
        int mid = a.length/2;
        long[] b = sort(Arrays.copyOfRange(a,0,mid)), c = sort(Arrays.copyOfRange(a,mid,a.length));
        for(int i = 0, j = 0, k = 0; i< a.length; i++){
            if(j<b.length && k<c.length){
                if(b[j]<c[k])a[i] = b[j++];
                else a[i] = c[k++];
            }else if(j<b.length)a[i] = b[j++];
            else a[i] = c[k++];
        }
        return a;
    }
 
    int[] ia(int ind,int n){
        int[] out = new int[ind+n];
        for(int i = 0; i< n; i++)out[ind+i] = ni();
        return out;
    }
 
    long[] la(int ind, int n){
        long[] out = new long[ind+n];
        for(int i = 0; i< n; i++)out[ind+i] = nl();
        return out;
    }
 
    double[] da(int ind, int n){
        double[] out = new double[ind+n];
        for(int i = 0; i< n; i++)out[ind+i] = nd();
        return out;
    }
 
    long gcd(long a, long b){return (b==0)?a:gcd(b,a%b);}
    int gcd(int a, int b){return (b==0)?a:gcd(b,a%b);}
    int bitcount(long n){return (n==0)?0:(1+bitcount(n&(n-1)));}
    void p(Object o){out.print(o);}
    void pn(Object o){out.println(o);}
    void pni(Object o){out.println(o);out.flush();}
    String n(){return in.next();}
    String nln(){return in.nextLine();}
    int ni(){return Integer.parseInt(in.next());}
    long nl(){return Long.parseLong(in.next());}
    double nd(){return Double.parseDouble(in.next());}
 
    class FastReader{
        BufferedReader br;
        StringTokenizer st;
        public FastReader(){
            br = new BufferedReader(new InputStreamReader(System.in));
        }
 
        public FastReader(String s) throws Exception{
            br = new BufferedReader(new FileReader(s));
        }
 
        String next(){
            while (st == null || !st.hasMoreElements()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch (IOException  e){
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
 
        String nextLine(){
            String str = "";
            try{
                str = br.readLine();
            }catch (IOException e){
                e.printStackTrace();
            }   
            return str;
        }
    }
}      