// Задача "Театр"
// XVI командный чемпионат школьников Санкт-Петербурга по программированию
// Автор задачи: Олег Давыдов, burunduk3@gmail.com
// Автор решения: Сергей Поромов, poromov@rain.ifmo.ru

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

public class theater_sp implements Runnable {

	public static void main(String[] args) {
		new Thread(new theater_sp()).run();
	}

	public void run() {
		try {
			Locale.setDefault(Locale.US);
			br = new BufferedReader(new FileReader(FILENAME + ".in"));
			out = new PrintWriter(FILENAME + ".out");
			solve();
			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	BufferedReader br;

	PrintWriter out;

	StringTokenizer st;

	String nextToken() throws IOException {
		while (st == null || !st.hasMoreTokens()) {
			st = new StringTokenizer(br.readLine());
		}
		return st.nextToken();
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	void myAssert(boolean e, String s) {
		if (!e) {
			throw new Error("Assertion failure " + s);
		}
	}

	private static final String FILENAME = "theater";
	
	double[][] tab;
	
	double[] countDist(int n, double[][] t) {
		double[] ret = new double[1 << n];
		for (int i = 4; i < (1 << n); i++) {
			if ((i & 3) == 3) {
				for (int j = 0; j < n; j++) {
					if ((i & (1 << j)) != 0) {
						int a = i ^ (1 << j);
						for (int k = 0; k < n; k++) {
							if ((a & (1 << k)) != 0) {
								if (t[i][j] > t[a][k] + tab[k][j] + tab[j][1] - tab[k][1]) {
									t[i][j] = t[a][k] + tab[k][j] + tab[j][1] - tab[k][1];
								}
							}
						}
					}
				}
			}
		}
		for (int i = 0; i < ret.length; i++) {
			ret[i] = Double.POSITIVE_INFINITY;
			for (int j = 0; j < t[i].length; j++) {
				ret[i] = Math.min(ret[i], t[i][j]);
			}
		}
		return ret;
	}

	public void solve() throws IOException {
		int w = nextInt();
		int l = nextInt();
		int v1 = nextInt();
		int v2 = nextInt();
		int n = nextInt();
		int[] x = new int[n];
		int[] y = new int[n];
		for (int i = 0; i < n; i++) {
			x[i] = nextInt();
			y[i] = nextInt();
		}
		tab = new double[n + 2][n + 2];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < n; j++) {
				tab[i + 2][j + 2] = Math.hypot(x[i] - x[j], y[i] - y[j]);
				tab[j + 2][i + 2] = tab[i + 2][j + 2];
			}
		}
		
		for (int i = 0; i < n; i++) {
			tab[0][i + 2] = x[i];
			tab[i + 2][0] = x[i];
			tab[1][i + 2] = x[i];
			tab[i + 2][1] = x[i];
		}
		double[][] dist = new double[1 << (n + 2)][n + 2];
		for (int i = 0; i < dist.length; i++) {
			Arrays.fill(dist[i], Double.POSITIVE_INFINITY);
		}
		dist[3][0] = 0;
		double[] d1 = countDist(n + 2, dist);

		for (int i = 0; i < n; i++) {
			tab[0][i + 2] = l - x[i];
			tab[i + 2][0] = l - x[i];
			tab[1][i + 2] = l - x[i];
			tab[i + 2][1] = l - x[i];
		}
		dist = new double[1 << (n + 2)][n + 2];
		for (int i = 0; i < dist.length; i++) {
			Arrays.fill(dist[i], Double.POSITIVE_INFINITY);
		}
		dist[3][0] = 0;
		double[] d2 = countDist(n + 2, dist);

		tab[0][1] = l;
		tab[1][0] = l;
		for (int i = 0; i < n; i++) {
			tab[0][i + 2] = x[i];
			tab[i + 2][0] = x[i];
			tab[1][i + 2] = l - x[i];
			tab[i + 2][1] = l - x[i];
		}
		dist = new double[1 << (n + 2)][n + 2];
		for (int i = 0; i < dist.length; i++) {
			Arrays.fill(dist[i], Double.POSITIVE_INFINITY);
		}
		dist[3][0] = l;
		double[] d3 = countDist(n + 2, dist);
		
		int m = nextInt();
		boolean[] oldstate = new boolean[n];
		{
			int tn = nextInt();
			for (int i = 0; i < tn; i++) {
				oldstate[nextInt() - 1] = true;
			}
		}
		double[][] a = new double[m][4];
		Arrays.fill(a[0], Double.POSITIVE_INFINITY);
		a[0][1] = 0;
		for (int ii = 0; ii < m - 1; ii++) {
			boolean[] state = new boolean[n];
			int tn = nextInt();
			for (int i = 0; i < tn; i++) {
				state[nextInt() - 1] = true;
			}
			
			int q1 = 3;
			int q2 = 3;
			for (int i = 0; i < n; i++) {
				if (state[i] && !oldstate[i]) {
					q1 |= (1 << (i + 2));
				}
				if (!state[i] && oldstate[i]) {
					q2 |= (1 << (i + 2));
				}
			}
			a[ii + 1][0] = a[ii][0] + Math.max(d1[q1] / v1, d1[q2] / v2);
			a[ii + 1][0] = Math.min(a[ii + 1][0], a[ii][1] + Math.max(d1[q1] / v1, d3[q2] / v2));
			a[ii + 1][0] = Math.min(a[ii + 1][0], a[ii][2] + Math.max(d3[q1] / v1, d1[q2] / v2));
			a[ii + 1][0] = Math.min(a[ii + 1][0], a[ii][3] + Math.max(d3[q1] / v1, d3[q2] / v2));

			a[ii + 1][1] = a[ii][0] + Math.max(d1[q1] / v1, d3[q2] / v2);
			a[ii + 1][1] = Math.min(a[ii + 1][1], a[ii][1] + Math.max(d1[q1] / v1, d2[q2] / v2));
			a[ii + 1][1] = Math.min(a[ii + 1][1], a[ii][2] + Math.max(d3[q1] / v1, d3[q2] / v2));
			a[ii + 1][1] = Math.min(a[ii + 1][1], a[ii][3] + Math.max(d3[q1] / v1, d2[q2] / v2));

			a[ii + 1][2] = a[ii][0] + Math.max(d3[q1] / v1, d1[q2] / v2);
			a[ii + 1][2] = Math.min(a[ii + 1][2], a[ii][1] + Math.max(d3[q1] / v1, d3[q2] / v2));
			a[ii + 1][2] = Math.min(a[ii + 1][2], a[ii][2] + Math.max(d2[q1] / v1, d1[q2] / v2));
			a[ii + 1][2] = Math.min(a[ii + 1][2], a[ii][3] + Math.max(d2[q1] / v1, d3[q2] / v2));

			a[ii + 1][3] = a[ii][0] + Math.max(d3[q1] / v1, d3[q2] / v2);
			a[ii + 1][3] = Math.min(a[ii + 1][3], a[ii][1] + Math.max(d3[q1] / v1, d2[q2] / v2));
			a[ii + 1][3] = Math.min(a[ii + 1][3], a[ii][2] + Math.max(d2[q1] / v1, d3[q2] / v2));
			a[ii + 1][3] = Math.min(a[ii + 1][3], a[ii][3] + Math.max(d2[q1] / v1, d2[q2] / v2));
			oldstate = state;
		}
		double ans = Math.min(a[m - 1][0], Math.min(a[m - 1][1], Math.min(a[m - 1][2], a[m - 1][3])));
		out.println(ans);
	}
}
