8
0 1 1
0 2 1
0 6 1
0 7 1
1 2 2
2 6 1
3 4 1
3 7 2
5 6 2
