import java.io.*;
import java.util.*;

/**
 * @author Roman V Satyukov
 */
public class theater_rs_bug1 implements Runnable {
    private final String problemID = getClass().getName().split("_")[0].toLowerCase();
    private static double inf = 1e100;
    private BufferedReader in;
    private PrintWriter out;
    private int W, L, v1, v2, n;
    private int[] x, y;
    private double[][] dist;
    
    private void check(boolean expr, String message) {
        if (!expr) {
            throw new AssertionError(message);
        }
    }
    
    private double[][] calcPaths(int v) {
        double[][] ans = new double[1 << n][n];
        for (int i = 0; i < ans.length; i++) {
            Arrays.fill(ans[i], inf);
        }
        ans[1][0] = 0;
        ans[2][1] = 0;
        for (int mask = 1; mask < (1 << n); mask++) {
            for (int i = 0; i < n; i++) {
                if ((mask & (1 << i)) == 0) {
                    continue;
                }
                for (int j = 0; j < n; j++) {
                    if ((mask & (1 << j)) == 0 || i == j) {
                        continue;
                    }
                    if (j <= 1 && (mask != ((1 << i) | (1 << j)))) {
                        continue;
                    }
                    ans[mask][i] = Math.min(ans[mask][i], ans[mask ^ (1 << i)][j] + dist[j][i] / v);
                }
            }
        }
        
        ans[1][0] = 0.0;
        ans[2][1] = 0.0;
        for (int mask = 3; mask < (1 << n); mask++) {
            if ((mask & 3) == 1) {
                ans[mask][0] = inf;
                for (int i = 2; i < n; i++) {
                    ans[mask][0] = Math.min(ans[mask][0], ans[mask][i] + dist[i][0]);
                }
            } else if ((mask & 3) == 2) {
                ans[mask][1] = inf;
                for (int i = 2; i < n; i++) {
                    ans[mask][1] = Math.min(ans[mask][1], ans[mask][i] + dist[i][1]);
                }
            }
        }
        return ans;
    }

    private int parseMask(String str) {
        StringTokenizer st = new StringTokenizer(str);
        int num = Integer.parseInt(st.nextToken());
        int mask = 0;
        for (int i = 0; i < num; i++) {
            int u = Integer.parseInt(st.nextToken()) - 1;
            check((0 <= u) && (u < n - 2), "Bad lamp in one of actions");
            check((mask & (1 << u)) == 0, "Some lamp occures at least twice in one of actions");
            mask = mask | (1 << u);
        }
        return mask;
    }

    private void solve() throws IOException {
        StringTokenizer st = new StringTokenizer(in.readLine());
        W = Integer.parseInt(st.nextToken());
        L = Integer.parseInt(st.nextToken());
        v1 = Integer.parseInt(st.nextToken());
        v2 = Integer.parseInt(st.nextToken());
        n = Integer.parseInt(st.nextToken());
        check((1 <= W) && (W <= 50), "W is not in [1..50]");
        check((1 <= L) && (L <= 50), "L is not in [1..50]");
        check((1 <= v1) && (v1 <= 20), "v1 is not in [1..20]");
        check((1 <= v2) && (v2 <= 20), "v2 is not in [1..20]");
        check((1 <= n) && (n <= 15), "n is not in [1..15]");
        x = new int[n];
        y = new int[n];
        for (int i = 0; i < n; i++) {
            st = new StringTokenizer(in.readLine());
            x[i] = Integer.parseInt(st.nextToken());
            y[i] = Integer.parseInt(st.nextToken());
            check((1 <= x[i]) && (x[i] <= L - 1), "Some of x[i] is out of scene");
            check((1 <= y[i]) && (y[i] <= W - 1), "Some of y[i] is out of scene");
        }
        dist = new double[n + 2][n + 2];
        for (int i = 0; i < n + 2; i++) {
            for (int j = 0; j < n + 2; j++) {
                if (i > 1 && j > 1) {
                    dist[i][j] = Math.hypot(x[i - 2] - x[j - 2], y[i - 2] - y[j - 2]);
                } else if (j > 1) {
                    dist[i][j] = (i == 0) ? x[j - 2] : L - x[j - 2]; 
                } else if (i > 1) {
                    dist[i][j] = (j == 0) ? x[i - 2] : L - x[i - 2]; 
                } else {
                    dist[i][j] = (i == j) ? 0 : L;
                }
            }
        }
        n += 2;
        
        double[][] first = calcPaths(v1);
        double[][] second = calcPaths(v2);
        int m = Integer.parseInt(in.readLine());
        check((1 <= m) && (m <= 10000), "m is not in [1..10,000]");
        int prevMask = 0;
        double[][] answer = new double[m + 1][4];
        Arrays.fill(answer[0], inf);
        answer[0][2] = 0.0;
        for (int i = 0; i < m; i++) {
            int curMask = parseMask(in.readLine());
            if (i == 0) {
                prevMask = curMask;
            }
            int turnOn = (curMask & (~prevMask)) << 2;
            int turnOff = (prevMask & (~curMask)) << 2;
            for (int newPos = 0; newPos < 4; newPos++) {
                answer[i + 1][newPos] = inf;
                int f1 = (newPos & 1) == 0 ? 0 : 1;
                int f2 = (newPos & 2) == 0 ? 0 : 1;
                for (int oldPos = 0; oldPos < 4; oldPos++) {
                    int s1 = (oldPos & 1) == 0 ? 0 : 1;
                    int s2 = (oldPos & 2) == 0 ? 0 : 1;
                    double cur = answer[i][oldPos] + Math.max(first[turnOn | 1 << f1 | 1 << s1][f1], second[turnOff | 1 << f2 | 1 << s2][f2]);
                    answer[i + 1][newPos] = Math.min(answer[i + 1][newPos], cur);
                }
            }
            prevMask = curMask;
        }
        double result = inf;
        for (int i = 0; i < 4; i++) {
            result = Math.min(result, answer[m][i]);
        }
        out.println(result);
    }
    
    public static void main(String[] args) {
        new Thread(new theater_rs_bug1()).start();
    }

    public void run() {
        try {
            in = new BufferedReader(new FileReader(new File(problemID + ".in")));
            out = new PrintWriter(new File(problemID + ".out"));
            solve();
            in.close();
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
}
