import java.util.*;
import java.io.*;
public class main
{
public static void main(String[] args) throws IOException
{
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String[] line = in.readLine().split(" ");
int n = Integer.parseInt(line[0]);
int m = Integer.parseInt(line[1]);
int k = Integer.parseInt(line[2]);
int[] agent = new int[k];
double[] b1 = new double[k];
double[] b2 = new double[k];
for(int i = 0; i < k; ++i)
{
line = in.readLine().split(" ");
agent[i] = Integer.parseInt(line[0]);
b1[i] = Double.parseDouble(line[1]);
b2[i] = Double.parseDouble(line[2]);
}
int[] edge_u = new int[m];
int[] edge_v = new int[m];
int[] edge_count = new int[m];
double[] edge_cap = new double[m];
double[] edge_util = new double[m];
for(int i = 0; i < m; ++i)
{
line = in.readLine().split(" ");
edge_u[i] = Integer.parseInt(line[0]);
edge_v[i] = Integer.parseInt(line[1]);
edge_cap[i] = Double.parseDouble(line[2]);
edge_util[i] = Double.parseDouble(line[3]);
edge_count[i] = Integer.parseInt(line[4]);
}
line = in.readLine().split(" ");
int t = Integer.parseInt(line[0]);
int v = Integer.parseInt(line[1]);
int c_dest = Integer.parseInt(line[2]);
int[] dest = new int[c_dest];
int[] c_path = new int[c_dest];
double[] amount = new double[c_dest];
int[][][] path = new int[c_dest][][];
for(int i = 0; i < c_dest; ++i)
{
line = in.readLine().split(" ");
dest[i] = Integer.parseInt(line[0]);
c_path[i] = Integer.parseInt(line[1]);
amount[i] = Double.parseDouble(line[2]);
path[i] = new int[c_path[i]][];
for(int j = 0; j < c_path[i]; ++j)
{
line = in.readLine().split(" ");
int len = Integer.parseInt(line[0]);
path[i][j] = new int[len];
for(int z = 0; z < len; ++z)
{
path[i][j][z] = Integer.parseInt(line[z + 1]);
}
}
double d = amount[i] / c_path[i];
for(int j = 0; j < c_path[i]; ++j)
{
if (j != 0) System.out.print(' ');
System.out.format("%.15f", d);
}
System.out.println();
}
System.out.println("0 0");
}
}