//Ren5Jie4Di4Ling5%
#include<bits/stdc++.h>
#include<algorithm>
#include<queue>
using namespace std;
int n,m,k;
int u,v,w;
int c,a;
int f[1000]
signed main(){
	freopen("road.in","r",stdin);
	freopen("road.out","w",stdout);
	cin>>n>>m>>k;
	for(int i=1;i<=m;i++){
		cin>>u>>v>>w;
	}
	for(int i=1;i<=k;i++){
		cin>>c;
		for(int i=1;i<=n;i++){
			cin>>a;
		}
	}
	cout<<0;
	return 0;
} 
/*
4 4 2
1 4 6
2 3 7
4 2 5
4 3 4
1 1 8 2 4
100 1 3 2 4
*/
