Initialization of parent matrix suppose max range of a node is up to 1000 if there are 1000 nodes than also length of jump matrix will not exceed 10
jump = [ [ 0 for j in range ( 10 ) ] for i in range ( 1000 ) ] NEW_LINE