HORRIBLE

3
8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 4 8

80 6
0 4 5 20
1 8 8 
0 2 4 26
0 4 8 80
0 5 7 14
1 4 8

8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 4 8
3
8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 4 8

80 6
0 4 50 20
1 18 800
0 20 40 26
0 14 78 80
0 15 76 14
1 14 80

8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 4 8
3
8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 4 8

80 6
0 4 50 20
1 18 80
0 20 40 260
0 14 78 80
0 15 76 14
1 14 80

8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 4 8
3
8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 4 8

80 6
0 4 50 20
1 18 80
0 20 40 260
0 14 78 80
0 15 76 14
1 14 80

74 6
0 9 70 600
0 4 50 80
0 50 65 220
1 8 60
0 15 65 4004
1 20 73
1
74 6
0 9 70 600
0 4 50 80
0 50 65 220
1 8 60
0 15 65 4004
1 20 73
3
 8 6
 0 2 4 26
 0 4 8 80
 0 4 5 20
 1 8 8
 0 5 7 14
 1 4 8
 
 80 6
 0 4 5 20
 1 8 8
 0 2 4 26
 0 4 8 80
 0 5 7 14
 1 4 8
 
 8 6
 0 2 4 26
 0 4 8 80
 0 4 5 20
 1 8 8
 0 5 7 14
 1 4 8
3
8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 4 8

80 6
0 4 50 20
1 18 800
0 20 40 26
0 14 78 80
0 15 76 14
1 14 80

8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 4 8
1
8 12
0 2 4 26
0 4 8 80
0 4 5 20
0 5 7 14
1 1 8
1 2 8
1 3 8
1 4 8
1 5 8
1 6 8
1 7 8
1 8 8
1
8 11
0 2 4 26
0 4 8 80
0 4 5 20
1 1 8
1 2 8
1 3 8
1 4 8
1 5 8
1 6 8
1 7 8
1 8 8
3
8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 4 8

80 8
0 4 50 20
0 1 15 0
1 18 800
0 20 40 26
0 14 78 80
0 4 15 0
0 15 76 14
1 14 80

8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 4 8
3
8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 4 8

80 8
0 4 50 20
0 1 15 0
1 18 800
0 20 40 26
0 14 78 80
0 4 15 0
0 15 76 14
1 14 80

8  8
0 2 4 26
0 4 8 80
0 1 5 445
0 4 5 20
1 8 8 
0 5 7 14
1 1 8
1 4 8
2
80 8
0 4 50 20
0 1 15 0
1 18 800
0 20 40 26
0 14 78 80
0 4 15 0
0 15 76 14
1 14 80

8  8
0 2 4 26
0 4 8 80
0 1 5 445
0 4 5 20
1 8 8 
0 5 7 14
1 1 8
1 4 8
3
8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 4 8
1
10000 4
0 2 1536 136
0 5236 53625 236
0 123 256 12
1 2 1000
1
10000 4
0 2 1536 136
0 5236 53625 236
0 123 256 12
1 2 16320
1
10000 4
0 2 1536 136
0 5236 53625 23626
0 123 256 12
1 2 16320
1
10000 4
0 2 1536 136
0 5236 53625 23626
0 123 256 12236
1 2 16320
1
10000 4
0 2 1536 136
0 5236 53625 2362605
0 123 256 1223656
1 2 16320
1
10000 6
0 2 1536 136
0 5236 53625 2362605
0 5236 53625 2362605
0 123 256 1223656
0 123 256 1223656
1 2 16320
1
10000 10
0 2 1536 136
0 5236 53625 2362605
0 5236 53625 2362605
0 5236 53625 2362605
0 5236 53625 2362605
0 123 2561 1223656
0 123 2569 1223656
0 123 2565 1223656
0 123 2564 1223656
1 2 16320
2
8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8
0 5 7 14
1 4 8
8 16
0 1 2 10
1 1 4
0 3 4 1
1 1 4
0 3 5 2
1 1 8
0 1 8 2
1 7 8
0 6 8 2
1 6 8
0 8 8 1
1 6 8
0 1 8 2
1 4 4
1 3 3
1 3 4


1
4 3
0 1 4 1
1 2 2
1 1 3
1
100000 7
0 1 50000 12456
0 56984 99648 10000000
1 56 12354
0 1 100000 254690
0 65892 100000
1 24569 99999
1 2 100000
1
100000 7
0 1 50000 12456
0 56984 99648 10000000
1 56 12354
0 1 100000 254690
0 65892 100000 12546
1 24569 99999
1 2 100000
1
10000 10
0 2 1536 136
1 1 10000
0 5236 53625 2362605
1 1 10000
0 5236 53625 2362605
1 1 10000
0 5236 53625 2362605
1 1 10000
0 5236 53625 2362605
1 1 10000
0 123 2561 1223656
1 1 10000
0 123 2569 1223656
1 1 10000
0 123 2565 1223656
1 1 10000
0 123 2564 1223656
1 1 10000
1 2 16320
1
10000 20
0 2 1536 136
1 1 10000
0 5236 53625 2362605
1 1 10000
0 5236 53625 2362605
1 1 10000
0 5236 53625 2362605
1 1 10000
0 5236 53625 2362605
1 1 10000
0 123 2561 1223656
1 1 10000
0 123 2569 1223656
1 1 10000
0 123 2565 1223656
1 1 10000
0 123 2564 1223656
1 1 10000
1 2 16320
2
8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8
0 5 7 14
1 4 8
8 16
0 1 2 10
1 1 4
0 3 4 1
1 1 4
0 3 5 2
1 1 8
0 1 8 2
1 7 8
0 6 8 2
1 6 8
0 8 8 1
1 6 8
0 1 8 2
1 4 4
1 3 3
1 3 4
1
100000 7
0 1 50000 12456
0 56984 99648 10000000
1 56 12354
0 1 100000 254690
0 65892 100000
1 24569 99999
1 2 100000
1
100000 7
0 1 50000 12456
0 56984 99648 10000000
1 56 12354
0 1 100000 254690
1 65892 100000
1 24569 99999
1 2 100000
1
10000 10
0 2 1536 136
1 1 10000
0 5236 53625 2362605
1 1 10000
0 5236 53625 2362605
1 1 10000
0 5236 53625 2362605
1 1 10000
0 5236 53625 2362605
1 1 10000
0 123 2561 1223656
1 1 10000
0 123 2569 1223656
1 1 10000
0 123 2565 1223656
1 1 10000
0 123 2564 1223656
1 1 10000
1 2 16320
1
8 3
0 2 4 26
0 4 8 80
1 8 8 
8 5
0 2 4 26
0 4 8 80
0 4 5 20
0 5 7 14
1 4 8
1
8 5
0 2 4 26
0 4 8 80
0 4 5 20
0 5 7 14
1 4 8
8 4
0 2 4 26
0 4 8 80
0 5 7 14
1 4 8
1
8 4
0 2 4 26
0 4 8 80
0 5 7 14
1 4 8
1
10000 4
0 2 1536 136
0 523 5365 236
0 123 256 12
1 2 1000
1
100000 4
0 2 1536 136
0 5236 53625 23626
0 123 256 12236
1 2 16320
1
100000 10
0 2 1536 136
1 1 10000
0 5236 53625 2362605
1 1 10000
0 5236 53625 2362605
1 1 10000
0 5236 53625 2362605
1 1 10000
0 5236 53625 2362605
1 1 10000
0 123 2561 1223656
1 1 10000
0 123 2569 1223656
1 1 10000
0 123 2565 1223656
1 1 10000
0 123 2564 1223656
1 1 10000
1 2 16320
80 6
0 4 50 20
1 18 80
0 20 40 260
0 14 78 80
0 15 76 14
1 14 80
1
74 6
0 9 70 600
0 4 50 80
0 50 65 220
1 8 60
0 15 65 4004
1 20 73
1
10000 10
0 2 1536 136
0 5236 53625 2362605
0 5236 53625 2362605
0 5236 53625 2362605
0 5236 53625 2362605
0 123 2561 1223656
0 123 2569 1223656
0 123 2565 1223656
0 123 2564 1223656
1 2 16320
3
8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 4 8

80 8
0 4 50 20
0 1 15 0
1 18 800
0 20 40 26
0 14 78 80
0 4 15 0
0 15 76 14
1 14 80

8  8
0 2 4 26
0 4 8 80
0 1 5 445
0 4 5 20
1 8 8 
0 5 7 14
1 1 8
1 4 8
#12.	
3
8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 4 8

80 8
0 4 50 20
0 1 15 0
1 18 80
0 20 40 26
0 14 78 80
0 4 15 0
0 15 76 14
1 14 80

8  8
0 2 4 26
0 4 8 80
0 1 5 445
0 4 5 20
1 8 8 
0 5 7 14
1 1 8
1 4 8
#12.	
3
8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 4 8

80 8
0 4 50 20
0 1 15 0
1 18 80
0 20 40 26
0 14 78 80
0 4 15 0
0 15 76 14
1 14 80

8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 4 8
1
4 3
0 1 4 1
1 2 2
1 1 3
3
3
8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 4 8

80 6
0 4 50 20
1 18 80
0 20 40 260
0 14 78 80
0 15 76 14
1 14 80

74 6
0 9 70 600
0 4 50 80
0 50 65 220
1 8 60
0 15 65 4004
1 20 73
3
8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 4 8
1
8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 4 8
1
8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
0 5 7 14
1 3 8
1
8 6
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
1 3 8
1
8 5
0 2 4 26
0 4 8 80
0 4 5 20
1 8 8 
1 3 8