





import math





class 				A_				:







       """simple docstring"""





       def __init__(    self	:	List[Any]						,__A	:	List[Any]=0  )						->					int:  # a graph with Node 0,1,...,N-1
         _lowercase							= n
         _lowercase							= [
             [math.inf for j in range(0						,__A  )] for i in range(0						,__A  )
         ]  # adjacency matrix for weight
         _lowercase							= [
             [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	:	Union[str, Any]						,__A	:	List[str]						,__A	:	str						,__A	:	int  )						->					Union[str, Any]:
         _lowercase							= w







       def    __UpperCAmelCase (    self	:	List[str]  )						->					List[str]:
         for k in range(0						,self.n  ):
           for i in range(0						,self.n  ):
             for j in range(0						,self.n  ):
               _lowercase							= min(self.dp[i][j]						,self.dp[i][k] + self.dp[k][j]  )







       def    __UpperCAmelCase (    self	:	int						,__A	:	Dict						,__A	:	Tuple  )						->					Optional[Any]:
         return self.dp[u][v]


if __name__ == "__main__":
      snake_case 				=       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)






def 							SCREAMING_SNAKE_CASE__       (  snake_case__  :str			,							snake_case__  :int     )      ->						list[str]:
  return [sentence[i : i + ngram_size] for i in range(len(snake_case__     ) - ngram_size + 1     )]


if __name__ == "__main__":
      from doctest import testmod

      testmod()