def      lowerCAmelCase_       ( __lowerCAmelCase						,    __lowerCAmelCase  )->     List[str]:






      '''simple docstring'''





      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      lowerCAmelCase_       ( __lowerCAmelCase						,    __lowerCAmelCase  )->     Union[str, Any]:






      '''simple docstring'''





      UpperCAmelCase			:       int			     =[[float('''inf'''  ) for _ in range(_UpperCamelCase  )] for _ in range(_UpperCamelCase  )]

      for i in range(_UpperCamelCase  ):
            for j in range(_UpperCamelCase  ):
                  UpperCAmelCase			:       Dict			     =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]
                        ):
                              UpperCAmelCase			:       List[Any]			     =dist[i][k] + dist[k][j]

      _print_dist(_UpperCamelCase						,    _UpperCamelCase  )
      return dist, v


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

     __snake_case						=			[[float('''inf''') for i in range(v)] for j in range(v)]

     for i in range(v):
          __snake_case						=			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)
          __snake_case						=			int(input('''Enter source:'''))
          __snake_case						=			int(input('''Enter destination:'''))
          __snake_case						=			float(input('''Enter weight:'''))
          __snake_case						=			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







lowerCAmelCase_    =				{
    "joule": 1.0,
    "kilojoule": 1_0_0_0,
    "megajoule": 1_0_0_0_0_0_0,
    "gigajoule": 1_0_0_0_0_0_0_0_0_0,
    "wattsecond": 1.0,
    "watthour": 3_6_0_0,
    "kilowatthour": 3_6_0_0_0_0_0,
    "newtonmeter": 1.0,
    "calorie_nutr": 4_1_8_6.8,
    "kilocalorie_nutr": 4_1_8_6_8_0_0.0_0,
    "electronvolt": 1.602_176_634e-19,
    "britishthermalunit_it": 1_0_5_5.0_5_5_8_5,
    "footpound": 1.355_818,
}






def      lowerCamelCase_						(				_UpperCamelCase ,				_UpperCamelCase ,				_UpperCamelCase )		->						float:






				"""simple docstring"""


				if to_type not in ENERGY_CONVERSION or from_type not in ENERGY_CONVERSION:
								snake_case_						:    str				=  (
								    f'''Incorrect \'from_type\' or \'to_type\' value: {from_type!r}, {to_type!r}\n'''
								    f'''Valid values are: {", ".join(_UpperCamelCase )}'''
								)
								raise ValueError(_UpperCamelCase )
				return value * ENERGY_CONVERSION[from_type] / ENERGY_CONVERSION[to_type]


if __name__ == "__main__":
	import doctest

	doctest.testmod()
