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

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author dipankar12
 */
import java.io.*;
import java.util.*;
public class r477c {
    public static void main(String args[])
    {
        fastio in=new fastio(System.in);
        PrintWriter pw=new PrintWriter(System.out);

        int n=in.nextInt();
        int m=in.nextInt();
        int cl=in.nextInt();
        int ce=in.nextInt();
        int v=in.nextInt();
        
        TreeSet<Integer> st=new TreeSet<Integer>();
        TreeSet<Integer> ele=new TreeSet<Integer>();
        
        for(int i=0;i<cl;i++)
            st.add(in.nextInt());
        
        for(int i=0;i<ce;i++)
            ele.add(in.nextInt());
        
        int q=in.nextInt();
        for(int i=0;i<q;i++)
        {
            int x1=in.nextInt();
            int y1=in.nextInt();
            int x2=in.nextInt();
            int y2=in.nextInt();
            
            //same floor
            if(x1==x2)
                pw.println(Math.abs(y2-y1));
            else
            {
                //left stairs
                long ls=0;
                st.add(y1);
                if(st.first()!=y1)
                {
                    long p=st.lower(y1);
                    ls+=Math.abs(y1-p);
                    ls+=Math.abs(x2-x1);
                    ls+=Math.abs(y2-p);
                }
                
                if(ls==0)
                    ls=Long.MAX_VALUE;
                st.remove(y1);
                
                //right stairs
                long rs=0;
                st.add(y1);
                if(st.last()!=y1)
                {
                    long p=st.higher(y1);
                    rs+=Math.abs(p-y1);
                    rs+=Math.abs(x2-x1);
                    rs+=Math.abs(y2-p);
                }
                if(rs==0)
                    rs=Long.MAX_VALUE;
                st.remove(y1);
                
                //left ele
                long le=0;
                ele.add(y1);
                if(ele.first()!=y1)
                {
                    long p=ele.lower(y1);
                    le+=Math.abs(y1-p);
                    le+=(int)Math.ceil((double)Math.abs(x2-x1)/(double)v);
                    le+=Math.abs(y2-p);
                }
                if(le==0)
                    le=Long.MAX_VALUE;
                ele.remove(y1);
                
                //right ele
                long re=0;
                ele.add(y1);
                if(ele.last()!=y1)
                {
                    long p=ele.higher(y1);
                    //p=y1-p;
                    re+=Math.abs(p-y1);
                    //pw.println(re);
                    re+=(int)Math.ceil((double)Math.abs(x2-x1)/(double)v);
                    //pw.println(re);
                    re+=Math.abs(y2-p);
                    //pw.println(re);
                }
                if(re==0)
                    re=Long.MAX_VALUE;
                
                ele.remove(y1);
                long ans=Math.min(ls, Math.min(rs, Math.min(le, re)));
                //pw.println(ls+" "+rs+" "+le+" "+re);
                pw.println(ans);
            }
        }
        pw.close();
    }

    static class fastio {
     
            private final InputStream stream;
            private final byte[] buf = new byte[8192];
            private int cchar, snchar;
            private SpaceCharFilter filter;
     
            public fastio(InputStream stream) {
                this.stream = stream;
            }
     
            public int nxt() {
                if (snchar == -1)
                    throw new InputMismatchException();
                if (cchar >= snchar) {
                    cchar = 0;
                    try {
                        snchar = stream.read(buf);
                    } catch (IOException e) {
                        throw new InputMismatchException();
                    }
                    if (snchar <= 0)
                        return -1;
                }
                return buf[cchar++];
            }
     
            public int nextInt() {
                int c = nxt();
                while (isSpaceChar(c)) {
                    c = nxt();
                }
                int sgn = 1;
                if (c == '-') {
                    sgn = -1;
                    c = nxt();
                }
                int res = 0;
                do {
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    res *= 10;
                    res += c - '0';
                    c = nxt();
                } while (!isSpaceChar(c));
                return res * sgn;
            }
     
            public long nextLong() {
                int c = nxt();
                while (isSpaceChar(c)) {
                    c = nxt();
                }
                int sgn = 1;
                if (c == '-') {
                    sgn = -1;
                    c = nxt();
                }
                long res = 0;
                do {
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    res *= 10;
                    res += c - '0';
                    c = nxt();
                } while (!isSpaceChar(c));
                return res * sgn;
            }
     
            public int[] nextIntArray(int n) {
                int a[] = new int[n];
                for (int i = 0; i < n; i++) {
                    a[i] = nextInt();
                }
                return a;
            }
     
            public String readString() {
                int c = nxt();
                while (isSpaceChar(c)) {
                    c = nxt();
                }
                StringBuilder res = new StringBuilder();
                do {
                    res.appendCodePoint(c);
                    c = nxt();
                } while (!isSpaceChar(c));
                return res.toString();
            }
     
            public String nextLine() {
                int c = nxt();
                while (isSpaceChar(c))
                    c = nxt();
                StringBuilder res = new StringBuilder();
                do {
                    res.appendCodePoint(c);
                    c = nxt();
                } while (!isEndOfLine(c));
                return res.toString();
            }
     
            public boolean isSpaceChar(int c) {
                if (filter != null)
                    return filter.isSpaceChar(c);
                return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
            }
     
            private boolean isEndOfLine(int c) {
                return c == '\n' || c == '\r' || c == -1;
            }
     
            public interface SpaceCharFilter {
                public boolean isSpaceChar(int ch);
            }
        }
    

}
