#include <bits/stdc++.h>
using namespace std;
int main()
{
int n, m, k;
cin >> n >> m >> k;
vector<int> agent(k);
vector<double> b1(k), b2(k);
for(int i = 0; i < k; ++i)
{
cin >> agent[i] >> b1[i] >> b2[i];
}
vector<int> edge_u(m), edge_v(m), edge_count(m);
vector<double> edge_cap(m), edge_util(m);
for(int i = 0; i < m; ++i)
{
cin >> edge_u[i] >> edge_v[i] >> edge_cap[i] >> edge_util[i] >> edge_count[i];
}
int t, v, c_dest;
cin >> t >> v >> c_dest;
vector<int> dest(c_dest), c_path(c_dest);
vector<double> amount(c_dest);
vector<vector<vector<int>>> path(c_dest);
for(int i = 0; i < c_dest; ++i)
{
cin >> dest[i] >> c_path[i] >> amount[i];
path[i] = vector<vector<int>>(c_path[i], vector<int>());
for(int j = 0; j < c_path[i]; ++j)
{
int len;
cin >> len;
for(int z = 0; z < len; ++z)
{
int e;
cin >> e;
path[i][j].push_back(e);
}
}
double d = amount[i] / c_path[i];
for(int j = 0; j < c_path[i]; ++j)
{
if (j != 0) cout << ' ';
cout << fixed << setprecision(15) << d;
}
cout << endl;
}
cout << 0 << ' ' << 0 << endl;
return 0;
}