from __future__ import annotations

from collections import deque
from collections.abc import Iterator
from dataclasses import dataclass





@dataclass
class 					A							:
   __UpperCAmelCase			:			str              =      42
   __UpperCAmelCase			:			Tuple              =      42





class 					A							:


   def __init__(self					:						Optional[int]	,  __UpperCAmelCase					:						Any		)						->    Optional[Any]:
         """simple docstring"""



         UpperCAmelCase__								=  [[] for _ in range(__a		)]
         UpperCAmelCase__								=  size


   def __getitem__(self					:						Optional[Any]	,  __UpperCAmelCase					:						int		)						->    Iterator[Edge]:
         """simple docstring"""



         return iter(self._graph[vertex]		)


   @property
   def       lowercase_				(self					:						Optional[Any]		)						->    Tuple:
         """simple docstring"""



         return self._size


   def       lowercase_				(self					:						Optional[int]	,  __UpperCAmelCase					:						Optional[int]	,  __UpperCAmelCase					:						Union[str, Any]	,  __UpperCAmelCase					:						List[Any]		)						->    Any:
         """simple docstring"""



         if weight not in (0, 1):
               raise ValueError("Edge weight must be either 0 or 1."		)

         if to_vertex < 0 or to_vertex >= self.size:
               raise ValueError("Vertex indexes must be in [0; size)."		)

         self._graph[from_vertex].append(Edge(__a	,  __a		)		)





   def       lowercase_				(self					:						Any	,  __UpperCAmelCase					:						Union[str, Any]	,  __UpperCAmelCase					:						Any		)						->    int | None:
         """simple docstring"""



         UpperCAmelCase__								=  deque([start_vertex]		)
         UpperCAmelCase__								=  [None] * self.size
         UpperCAmelCase__								=  0

         while queue:
               UpperCAmelCase__								=  queue.popleft()
               UpperCAmelCase__								=  distances[current_vertex]
               if current_distance is None:
                     continue

               for edge in self[current_vertex]:
                     UpperCAmelCase__								=  current_distance + edge.weight
                     UpperCAmelCase__								=  distances[edge.destination_vertex]
                     if (
                         isinstance(__a	,  __a		)
                         and new_distance >= dest_vertex_distance
                     ):
                           continue
                     UpperCAmelCase__								=  new_distance
                     if edge.weight == 0:
                           queue.appendleft(edge.destination_vertex		)
                     else:
                           queue.append(edge.destination_vertex		)

         if distances[finish_vertex] is None:
               raise ValueError("No path from start_vertex to finish_vertex."		)

         return distances[finish_vertex]


if __name__ == "__main__":
      import doctest

      doctest.testmod()

from __future__ import annotations




def        lowerCAmelCase_			(					__A							)					->    list[int]:







      '''simple docstring'''


      if len(__A							) == 0:
            return array

      UpperCAmelCase__		,				UpperCAmelCase__								=  min(__A							), max(__A							)

      # Compute the variables
      UpperCAmelCase__								=  _max - _min + 1
      UpperCAmelCase__		,				UpperCAmelCase__								=  [0] * holes_range, [0] * holes_range

      # Make the sorting.
      for i in array:
            UpperCAmelCase__								=  i - _min
            UpperCAmelCase__								=  i
            holes_repeat[index] += 1

      # Makes the array back by replacing the numbers.
      UpperCAmelCase__								=  0
      for i in range(__A							):
            while holes_repeat[i] > 0:
                  UpperCAmelCase__								=  holes[i]
                  index += 1
                  holes_repeat[i] -= 1

    # Returns the sorted array.
      return array


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      UpperCamelCase__    							= input('Enter numbers separated by comma:\n')
      UpperCamelCase__    							= [int(x) for x in user_input.split(',')]
      print(pigeon_sort(unsorted))



