dist [ ] [ ] will be the output matrix that will finally have the shortest distances between every pair of numbers
dist = [ [ 0 for i in range ( n ) ] for i in range ( n ) ] NEW_LINE i , j , k = 0 , 0 , 0 NEW_LINE