5
0 1 5
0 2 2
0 3 5
0 4 2
1 2 1
1 3 3
2 3 1
2 4 5
3 4 1
