using System;
class main
{
public static void Main(string[] args)
{
string[] line = Console.ReadLine().Split(' ');
int n = Int32.Parse(line[0]);
int m = Int32.Parse(line[1]);
int k = Int32.Parse(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 = Console.ReadLine().Split(' ');
agent[i] = Int32.Parse(line[0]);
b1[i] = Double.Parse(line[1]);
b2[i] = Double.Parse(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 = Console.ReadLine().Split(' ');
edge_u[i] = Int32.Parse(line[0]);
edge_v[i] = Int32.Parse(line[1]);
edge_cap[i] = Double.Parse(line[2]);
edge_util[i] = Double.Parse(line[3]);
edge_count[i] = Int32.Parse(line[4]);
}
line = Console.ReadLine().Split(' ');
int t = Int32.Parse(line[0]);
int v = Int32.Parse(line[1]);
int c_dest = Int32.Parse(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 = Console.ReadLine().Split(' ');
dest[i] = Int32.Parse(line[0]);
c_path[i] = Int32.Parse(line[1]);
amount[i] = Double.Parse(line[2]);
path[i] = new int[c_path[i]][];
for(int j = 0; j < c_path[i]; ++j)
{
line = Console.ReadLine().Split(' ');
int len = Int32.Parse(line[0]);
path[i][j] = new int[len];
for(int z = 0; z < len; ++z)
{
path[i][j][z] = Int32.Parse(line[z + 1]);
}
}
double d = amount[i] / c_path[i];
for(int j = 0; j < c_path[i]; ++j)
{
if (j != 0) Console.Write(' ');
Console.Write("{0:F15}", d);
}
Console.WriteLine();
}
Console.WriteLine("0 0");
}
}