"""simple docstring"""



from __future__ import annotations



def 					_lowerCamelCase(					a ,  a							):
							print(F"Vertex\tShortest Distance from vertex {src}"							)
							for i, d in enumerate(snake_case_							):
														print(F"{i}\t\t{d}"							)



def 					_lowerCamelCase(					a ,  a ,  a							):




							for j in range(snake_case_							):
														__a				, __a				, __a     				=  (graph[j][k] for k in ["src", "dst", "weight"])
														if distance[u] != float("inf"							) and distance[u] + w < distance[v]:
																					return True
							return False



def 					_lowerCamelCase(					a ,  a ,  a ,  a							):
							__a     				=  [float("inf"							)] * vertex_count
							__a     				=  0.0

							for _ in range(vertex_count - 1							):
														for j in range(snake_case_							):
																					__a				, __a				, __a     				=  (graph[j][k] for k in ["src", "dst", "weight"])

																					if distance[u] != float("inf"							) and distance[u] + w < distance[v]:
																												__a     				=  distance[u] + w

							__a     				=  check_negative_cycle(snake_case_ ,  snake_case_ ,  snake_case_							)
							if negative_cycle_exists:
														raise Exception("Negative cycle found"							)

							return distance


if __name__ == "__main__":
			import doctest

			doctest.testmod()

			SCREAMING_SNAKE_CASE__:Tuple			=	int(input("""Enter number of vertices: """).strip())
			SCREAMING_SNAKE_CASE__:Dict			=	int(input("""Enter number of edges: """).strip())

			SCREAMING_SNAKE_CASE__:list[dict[str, int]]			=	[{} for _ in range(E)]

			for i in range(E):
						print("""Edge """, i + 1)
						SCREAMING_SNAKE_CASE__:str			=	(
						    int(x)
						    for x in input("""Enter source, destination, weight: """).strip().split(""" """)
						)
						SCREAMING_SNAKE_CASE__:int			=	{'src': src, 'dst': dest, 'weight': weight}

			SCREAMING_SNAKE_CASE__:Any			=	int(input("""\nEnter shortest path source:""").strip())
			SCREAMING_SNAKE_CASE__:int			=	bellman_ford(graph, V, E, source)
			print_distance(shortest_distance, 0)

"""simple docstring"""



SCREAMING_SNAKE_CASE__:Any			=	{
    """A""": """.-""", """B""": """-...""", """C""": """-.-.""", """D""": """-..""", """E""": """.""", """F""": """..-.""", """G""": """--.""",
    """H""": """....""", """I""": """..""", """J""": """.---""", """K""": """-.-""", """L""": """.-..""", """M""": """--""", """N""": """-.""",
    """O""": """---""", """P""": """.--.""", """Q""": """--.-""", """R""": """.-.""", """S""": """...""", """T""": """-""", """U""": """..-""",
    """V""": """...-""", """W""": """.--""", """X""": """-..-""", """Y""": """-.--""", """Z""": """--..""", """1""": """.----""",
    """2""": """..---""", """3""": """...--""", """4""": """....-""", """5""": """.....""", """6""": """-....""", """7""": """--...""",
    """8""": """---..""", """9""": """----.""", """0""": """-----""", """&""": """.-...""", """@""": """.--.-.""",
    """:""": """---...""", """,""": """--..--""", """.""": """.-.-.-""", """'""": """.----.""", """\"""": """.-..-.""",
    """?""": """..--..""", """/""": """-..-.""", """=""": """-...-""", """+""": """.-.-.""", """-""": """-....-""",
    """(""": """-.--.""", """)""": """-.--.-""", """!""": """-.-.--""", """ """: """/"""
}  # Exclamation mark is not in ITU-R recommendation
# fmt: on
SCREAMING_SNAKE_CASE__:Any			=	{value: key for key, value in MORSE_CODE_DICT.items()}



def 					_lowerCamelCase(					a							):
       return " ".join(MORSE_CODE_DICT[char] for char in message.upper()							)



def 					_lowerCamelCase(					a							):
       return "".join(REVERSE_DICT[char] for char in message.split()							)



def 					_lowerCamelCase(					):
       __a     				=  "Morse code here!"
       print(a							)
       __a     				=  encrypt(a							)
       print(a							)
       __a     				=  decrypt(a							)
       print(a							)


if __name__ == "__main__":
   main()
