




'''simple docstring'''



import math






class 							_a				:





       '''simple docstring'''






       def __init__(      self,							A=0  ):  # a graph with Node 0,1,...,N-1







             '''simple docstring'''







             SCREAMING_SNAKE_CASE   :      str    					=						n
             SCREAMING_SNAKE_CASE   :      Tuple    					=						[
                 [math.inf for j in range(0,							A  )] for i in range(0,							A  )
             ]  # adjacency matrix for weight
             SCREAMING_SNAKE_CASE   :      Optional[Any]    					=						[
                 [math.inf for j in range(0,							A  )] for i in range(0,							A  )
             ]  # dp[i][j] stores minimum distance from i to j







       def        UpperCamelCase_							(      self,							A,							A,							A  ):







             '''simple docstring'''







             SCREAMING_SNAKE_CASE   :      List[str]    					=						w







       def        UpperCamelCase_							(      self  ):







             '''simple docstring'''







             for k in range(0,							self.n  ):
                   for i in range(0,							self.n  ):
                         for j in range(0,							self.n  ):
                               SCREAMING_SNAKE_CASE   :      Optional[Any]    					=						min(self.dp[i][j],							self.dp[i][k] + self.dp[k][j]  )







       def        UpperCamelCase_							(      self,							A,							A  ):







             '''simple docstring'''







             return self.dp[u][v]


if __name__ == "__main__":
      UpperCamelCase_    	=				Graph(5)
      graph.add_edge(0, 2, 9)
      graph.add_edge(0, 4, 1_0)
      graph.add_edge(1, 3, 5)
      graph.add_edge(2, 3, 7)
      graph.add_edge(3, 0, 1_0)
      graph.add_edge(3, 1, 2)
      graph.add_edge(3, 2, 1)
      graph.add_edge(3, 4, 6)
      graph.add_edge(4, 1, 3)
      graph.add_edge(4, 2, 4)
      graph.add_edge(4, 3, 9)
      graph.floyd_warshall()
      graph.show_min(1, 4)
      graph.show_min(0, 3)








'''simple docstring'''



def   lowercase__(			__UpperCamelCase:					int    ):

      """simple docstring"""






      if not isinstance(__UpperCamelCase      ,__UpperCamelCase    ):
            raise TypeError('Input value must be an \'int\' type'    )

      SCREAMING_SNAKE_CASE   :      int    					=						0
      while number:
            position += 1
            number >>= 1

      return position


if __name__ == "__main__":
      import doctest

      doctest.testmod()


