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

public class StairsAndElevators {

    public static TreeSet<Integer> stairs = new TreeSet<>();
    public static TreeSet<Integer> elevators= new TreeSet<>();

    public static void main (String[] args) throws Exception {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String[] spl = in.readLine().split(" ");
        int numFloors = Integer.parseInt(spl[0]);
        int numSections = Integer.parseInt(spl[1]);
        int numStairs = Integer.parseInt(spl[2]);
        int numElevators = Integer.parseInt(spl[3]);
        int speed = Integer.parseInt(spl[4]);

        stairs = new TreeSet<>();
        elevators = new TreeSet<>();

        spl = in.readLine().split(" ");
        for (int i = 0; i < numStairs; i++) {
            int stair = Integer.parseInt(spl[i]);
            stairs.add(stair);
        }

        spl = in.readLine().split(" ");
        for (int i = 0; i < numElevators; i++) {
            int elevator = Integer.parseInt(spl[i]);
            elevators.add(elevator);
        }

        int q = Integer.parseInt(in.readLine());
        for (int i = 0; i < q; i++) {
            spl = in.readLine().split(" ");
            int f1 = Integer.parseInt(spl[0]);
            int s1= Integer.parseInt(spl[1]);
            int f2= Integer.parseInt(spl[2]);
            int s2 = Integer.parseInt(spl[3]);

            if (f1 == f2) {
                System.out.println(Math.abs(s1 - s2));
                continue;
            }
            if (s1 > s2) {
                int tmp = s1;
                s1 = s2;
                s2 = tmp;
            }

            Integer a = stairs.higher(s1);
            Integer b = stairs.lower(s2);
            int h = Math.abs(f1 - f2);

            int ca = a == null ? Integer.MAX_VALUE : Math.abs(s1 - a) + Math.abs(s2 - a) + h;
            int cb = b == null ? Integer.MAX_VALUE : Math.abs(s1 - b) + Math.abs(s2 - b) + h;

            a = elevators.higher(s1);
            b = elevators.lower(s2);

            int ea = a == null ? Integer.MAX_VALUE : Math.abs(s1 - a) + Math.abs(s2 - a) + (h + speed - 1) / speed;
            int eb = b == null ? Integer.MAX_VALUE : Math.abs(s1 - b) + Math.abs(s2 - b) + (h + speed - 1) / speed;

            System.out.println(Math.min(Math.min(ca, cb), Math.min(ea, eb)));


        }
    }
}