





from queue import PriorityQueue
from typing import Any

import numpy as np






def lowerCamelCase__   (							snake_case_     :  dict	,				snake_case_     :  str	,				snake_case_     :  set	,				snake_case_     :  set	,				snake_case_     :  dict	,				snake_case_     :  dict	,				snake_case_     :  PriorityQueue	,				snake_case_     :  dict	,				snake_case_     :  float | int	,				)				->    float | int:
   for nxt, d in graph[v]:
      if nxt in visited_forward:
         continue
      __snake_case								=       cst_fwd.get(snake_case_	,				np.inf	)
      __snake_case								=       cst_fwd[v] + d
      if new_cost_f < old_cost_f:
         queue.put((new_cost_f, nxt)	)
         __snake_case								=       new_cost_f
         __snake_case								=       v
      if nxt in visited_backward:
         if cst_fwd[v] + d + cst_bwd[nxt] < shortest_distance:
            __snake_case								=       cst_fwd[v] + d + cst_bwd[nxt]
   return shortest_distance






def lowerCamelCase__   (							snake_case_     :  str	,				snake_case_     :  str	,				snake_case_     :  dict	,				snake_case_     :  dict	)				->    int:
   __snake_case								=       -1

   __snake_case								=       set()
   __snake_case								=       set()
   __snake_case								=       {source: 0}
   __snake_case								=       {destination: 0}
   __snake_case								=       {source: None}
   __snake_case								=       {destination: None}
   __snake_case								=       PriorityQueue()
   __snake_case								=       PriorityQueue()

   __snake_case								=       np.inf

   queue_forward.put((0, source)	)
   queue_backward.put((0, destination)	)

   if source == destination:
      return 0

   while not queue_forward.empty() and not queue_backward.empty():
      __snake_case	,     __snake_case								=       queue_forward.get()
      visited_forward.add(snake_case_	)

      __snake_case	,     __snake_case								=       queue_backward.get()
      visited_backward.add(snake_case_	)

      __snake_case								=       pass_and_relaxation(
          snake_case_	,				snake_case_	,				snake_case_	,				snake_case_	,				snake_case_	,				snake_case_	,				snake_case_	,				snake_case_	,				snake_case_	,				)

      __snake_case								=       pass_and_relaxation(
          snake_case_	,				snake_case_	,				snake_case_	,				snake_case_	,				snake_case_	,				snake_case_	,				snake_case_	,				snake_case_	,				snake_case_	,				)

      if cst_fwd[v_fwd] + cst_bwd[v_bwd] >= shortest_distance:
         break

   if shortest_distance != np.inf:
      __snake_case								=       shortest_distance
   return shortest_path_distance


snake_case_           =      {
    'B': [['C', 1]],
    'C': [['D', 1]],
    'D': [['F', 1]],
    'E': [['B', 1], ['G', 2]],
    'F': [],
    'G': [['F', 1]],
}
snake_case_           =      {
    'B': [['E', 1]],
    'C': [['B', 1]],
    'D': [['C', 1]],
    'F': [['D', 1], ['G', 1]],
    'E': [[None, np.inf]],
    'G': [['E', 2]],
}

if __name__ == "__main__":
    import doctest

    doctest.testmod()








def lowerCamelCase__   (							snake_case_     :  int = 1000	)				->    int:
   __snake_case								=       2**power
   __snake_case								=       str(snake_case_	)
   __snake_case								=       list(snake_case_	)
   __snake_case								=       0

   for i in list_num:
      sum_of_num += int(snake_case_	)

   return sum_of_num


if __name__ == "__main__":
    snake_case_           =      int(input('Enter the power of 2: ').strip())
    print('2 ^ ', power, ' = ', 2**power)
    snake_case_           =      solution(power)
    print('Sum of the digits is: ', result)

