


'''simple docstring'''

# A Bipartite Graph is a graph whose vertices can be divided into two independent sets,
# U and V such that every edge (u, v) either connects a vertex from U to V or a vertex
# from V to U. In other words, for every edge (u, v), either u belongs to U and v to V,
# or u belongs to V and v to U. We can also say that there is no edge that connects
# vertices of same set.
from queue import Queue



def 							SCREAMING_SNAKE_CASE__(		_UpperCamelCase   :					List[str] )		->       str:





   '''simple docstring'''







   UpperCamelCase__			    =    Queue()
   UpperCamelCase__			    =    [False] * len(_UpperCamelCase )
   UpperCamelCase__			    =    [-1] * len(_UpperCamelCase )

   def bfs():
      while not queue.empty():
         UpperCamelCase__			    =    queue.get()
         UpperCamelCase__			    =    True

         for neighbour in graph[u]:
            if neighbour == u:
               return False

            if color[neighbour] == -1:
               UpperCamelCase__			    =    1 - color[u]
               queue.put(_UpperCamelCase )

            elif color[neighbour] == color[u]:
               return False

      return True

   for i in range(len(_UpperCamelCase ) ):
      if not visited[i]:
         queue.put(_UpperCamelCase )
         UpperCamelCase__			    =    0
         if bfs() is False:
            return False

   return True


if __name__ == "__main__":
       # Adjacency List of graph
       print(check_bipartite({0: [1, 3], 1: [0, 2], 2: [1, 3], 3: [0, 2]}))


def  snake_case_(_UpperCamelCase					,			_UpperCamelCase					,			_UpperCamelCase	)				->      Optional[Any]:



  """simple docstring"""






  _snake_case		=				index
  _snake_case		=				2 * index + 1
  _snake_case		=				2 * index + 2
  if left_index < heap_size and unsorted[left_index] > unsorted[largest]:
    _snake_case		=				left_index

  if right_index < heap_size and unsorted[right_index] > unsorted[largest]:
    _snake_case		=				right_index

  if largest != index:
    _snake_case,	_snake_case		=				unsorted[index], unsorted[largest]
    heapify(_UpperCamelCase					,			_UpperCamelCase					,			_UpperCamelCase	)



def  snake_case_(_UpperCamelCase	)				->      Any:



  """simple docstring"""






  _snake_case		=				len(_UpperCamelCase	)
  for i in range(n // 2 - 1					,			-1					,			-1	):
    heapify(_UpperCamelCase					,			_UpperCamelCase					,			_UpperCamelCase	)
  for i in range(n - 1					,			0					,			-1	):
    _snake_case,	_snake_case		=				unsorted[i], unsorted[0]
    heapify(_UpperCamelCase					,			0					,			_UpperCamelCase	)
  return unsorted


if __name__ == "__main__":
 __A     						=      input('''Enter numbers separated by a comma:\n''').strip()
 __A     						=      [int(item) for item in user_input.split(''',''')]
 print(heap_sort(unsorted))

