3
10
100000 200 12345
100000 50 88
100000 49 1
100000 37 1
100000 0 99999
100000 8 89345
100000 88 14231
100000 19 55443
100000 101 87654
100000 88 49832
1
100000 98765 99900
10
100000 0 70000
99999 0 69999
99998 0 69998
99997 0 69997
99996 0 69996
99995 0 69996
99994 0 69995
99993 0 69994
99992 0 69994
99991 0 69993