






import heapq






def     lowerCamelCase__				(   __lowerCamelCase      :					List[str]  ,		__lowerCamelCase      :					List[Any]  ,		__lowerCamelCase      :					Optional[int]		):
  __UpperCAmelCase							:     List[Any]									=  [(0, start)]  # cost from start node,end node
  __UpperCAmelCase							:     List[str]									=  set()
  while heap:
    ((__UpperCAmelCase)				,			(__UpperCAmelCase))							:     str									=  heapq.heappop(__lowerCamelCase		)
    if u in visited:
      continue
    visited.add(__lowerCamelCase		)
    if u == end:
      return cost
    for v, c in graph[u]:
      if v in visited:
        continue
      __UpperCAmelCase							:     Dict									=  cost + c
      heapq.heappush(__lowerCamelCase  ,		(next_item, v)		)
  return -1


a		:	Union[str, Any]      					=			{
    "A": [["B", 2], ["C", 5]],
    "B": [["A", 2], ["D", 3], ["E", 1], ["F", 1]],
    "C": [["A", 5], ["F", 3]],
    "D": [["B", 3]],
    "E": [["B", 4], ["F", 3]],
    "F": [["C", 3], ["E", 3]],
}
a		:	List[Any]      					=			{
    "B": [["C", 1]],
    "C": [["D", 1]],
    "D": [["F", 1]],
    "E": [["B", 1], ["F", 3]],
    "F": [],
}
a		:	Optional[int]      					=			{
    "B": [["C", 1]],
    "C": [["D", 1]],
    "D": [["F", 1]],
    "E": [["B", 1], ["G", 2]],
    "F": [],
    "G": [["F", 1]],
}

a		:	Tuple      					=			dijkstra(G, "E", "C")
print(short_distance)  # E -- 3 --> F -- 3 --> C == 6

a		:	Optional[int]      					=			dijkstra(Ga, "E", "F")
print(short_distance)  # E -- 3 --> F == 3

a		:	List[Any]      					=			dijkstra(Ga, "E", "F")
print(short_distance)  # E -- 2 --> G -- 1 --> F == 3

if __name__ == "__main__":
       import doctest

       doctest.testmod()










def     lowerCamelCase__				(   __lowerCamelCase      :					list  ,		__lowerCamelCase      :					int		):
  for index, item in enumerate(__lowerCamelCase		):
    if item == target:
      return index
  return -1






def     lowerCamelCase__				(   __lowerCamelCase      :					list  ,		__lowerCamelCase      :					int  ,		__lowerCamelCase      :					int  ,		__lowerCamelCase      :					int		):
  if not (0 <= high < len(__lowerCamelCase		) and 0 <= low < len(__lowerCamelCase		)):
    raise Exception("""Invalid upper or lower bound!"""		)
  if high < low:
    return -1
  if sequence[low] == target:
    return low
  if sequence[high] == target:
    return high
  return rec_linear_search(__lowerCamelCase  ,		low + 1  ,		high - 1  ,		__lowerCamelCase		)


if __name__ == "__main__":
       a		:	List[str]      					=			input("Enter numbers separated by comma:\n").strip()
       a		:	Tuple      					=			[int(item.strip()) for item in user_input.split(",")]

       a		:	List[str]      					=			int(input("Enter a single number to be found in the list:\n").strip())
       a		:	Optional[Any]      					=			linear_search(sequence, target)
       if result != -1:
              print(f"""linear_search({sequence}, {target}) = {result}""")
       else:
              print(f"""{target} was not found in {sequence}""")


