#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
struct edge {
	int u, v, w; 
}e[1000001];
int f[1001], c[11], b[11]; 
int main() {
	freopen("road.in", "r", stdin);
	freopen("road.out", "w", stdout);
	int n, m, k; 
	while(std::cin >> n) {
}
	std::cout << 0; 
	return 0;
}

