






def 				snake_case__							(							UpperCAmelCase							:  Union[str, Any]    ,			UpperCAmelCase							:  Optional[Any]       ):
    print("\nThe shortest path matrix using Floyd Warshall algorithm\n"       )
    for i in range(UpperCAmelCase       ):
        for j in range(UpperCAmelCase       ):
            if dist[i][j] != float("inf"       ):
                print(int(dist[i][j]       )    ,			end="\t"       )
            else:
                print("INF"    ,			end="\t"       )
        print()


def 				snake_case__							(							UpperCAmelCase							:  Union[str, Any]    ,			UpperCAmelCase							:  Optional[int]       ):
    lowerCAmelCase__   :Tuple      							=				[[float("inf"       ) for _ in range(UpperCAmelCase       )] for _ in range(UpperCAmelCase       )]

    for i in range(UpperCAmelCase       ):
        for j in range(UpperCAmelCase       ):
            lowerCAmelCase__   :str      							=				graph[i][j]

            # check vertex k against all other vertices (i, j)
    for k in range(UpperCAmelCase       ):
        # looping through rows of graph array
        for i in range(UpperCAmelCase       ):
            # looping through columns of graph array
            for j in range(UpperCAmelCase       ):
                if (
                    dist[i][k] != float("inf"       )
                    and dist[k][j] != float("inf"       )
                    and dist[i][k] + dist[k][j] < dist[i][j]
                ):
                    lowerCAmelCase__   :Optional[int]      							=				dist[i][k] + dist[k][j]

    _print_dist(UpperCAmelCase    ,			UpperCAmelCase       )
    return dist, v


if __name__ == "__main__":
 _a    :   int        =			int(input("""Enter number of vertices: """))
 _a    :   int        =			int(input("""Enter number of edges: """))

 _a    :   Union[str, Any]        =			[[float("""inf""") for i in range(v)] for j in range(v)]

 for i in range(v):
  _a    :   Optional[Any]        =			0.0

  # src and dst are indices that must be within the array size graph[e][v]
  # failure to follow this will result in an error
 for i in range(e):
  print("""\nEdge """, i + 1)
  _a    :   Union[str, Any]        =			int(input("""Enter source:"""))
  _a    :   List[str]        =			int(input("""Enter destination:"""))
  _a    :   Optional[Any]        =			float(input("""Enter weight:"""))
  _a    :   Optional[Any]        =			weight

 floyd_warshall(graph, v)

 # Example Input
 # Enter number of vertices: 3
 # Enter number of edges: 2

 # # generated graph from vertex and edge inputs
 # [[inf, inf, inf], [inf, inf, inf], [inf, inf, inf]]
 # [[0.0, inf, inf], [inf, 0.0, inf], [inf, inf, 0.0]]

 # specify source, destination and weight for edge #1
 # Edge  1
 # Enter source:1
 # Enter destination:2
 # Enter weight:2

 # specify source, destination and weight for edge #2
 # Edge  2
 # Enter source:2
 # Enter destination:1
 # Enter weight:1

 # # Expected Output from the vertice, edge and src, dst, weight inputs!!
 # 0		INF	INF
 # INF	0	2
 # INF	1	0











import re


def 				snake_case__							(							UpperCAmelCase							:  str       ):
    return [char.split() for char in re.split(R"[^ a-z A-Z 0-9 \s]"    ,			str_       )]


def 				snake_case__							(							UpperCAmelCase							:  str       ):
    lowerCAmelCase__   :List[Any]      							=				split_input(str_       )
    return "".join(
        ["".join([char.capitalize() for char in sub_str]       ) for sub_str in string_split]       )


def 				snake_case__							(							UpperCAmelCase							:  str    ,			UpperCAmelCase							:  bool    ,			UpperCAmelCase							:  str       ):
    try:
        lowerCAmelCase__   :Dict      							=				split_input(UpperCAmelCase       )
        if upper:
            lowerCAmelCase__   :Dict      							=				"".join(
                [
                    separator.join([char.upper() for char in sub_str]       )
                    for sub_str in string_split
                ]       )
        else:
            lowerCAmelCase__   :Any      							=				"".join(
                [
                    separator.join([char.lower() for char in sub_str]       )
                    for sub_str in string_split
                ]       )
        return res_str
    except IndexError:
        return "not valid string"


def 				snake_case__							(							UpperCAmelCase							:  str       ):
    return to_simple_case(UpperCAmelCase       )


def 				snake_case__							(							UpperCAmelCase							:  str       ):
    try:
        lowerCAmelCase__   :Any      							=				to_simple_case(UpperCAmelCase       )
        return res_str[0].lower() + res_str[1:]
    except IndexError:
        return "not valid string"


def 				snake_case__							(							UpperCAmelCase							:  str    ,			UpperCAmelCase							:  bool       ):
    return to_complex_case(UpperCAmelCase    ,			UpperCAmelCase    ,			"_"       )


def 				snake_case__							(							UpperCAmelCase							:  str    ,			UpperCAmelCase							:  bool       ):
    return to_complex_case(UpperCAmelCase    ,			UpperCAmelCase    ,			"-"       )


if __name__ == "__main__":
 __import__("""doctest""").testmod()



