






'''simple docstring'''


def 	lowerCAmelCase__      (       SCREAMING_SNAKE_CASE__		):
 __a     :						Union[str, Any]          =    min(__A		)  # min() finds the minimum value
 __a     :						str          =    max(__A		)  # max() finds the maximum value

 __a     :						Optional[int]          =    max_val - min_val + 1  # size is difference of max and min values plus one

 # list of pigeonholes of size equal to the variable size
 __a     :						Union[str, Any]          =    [0] * size

 # Populate the pigeonholes.
 for x in a:
  assert isinstance(__A							,		__A		), "integers only please"
  holes[x - min_val] += 1

 # Putting the elements back into the array in an order.
 __a     :						str          =    0
 for count in range(__A		):
  while holes[count] > 0:
   holes[count] -= 1
   __a     :						Tuple          =    count + min_val
   i += 1






def 	lowerCAmelCase__      (       ):
 __a     :						int          =    [8, 3, 2, 7, 4, 6, 8]
 pigeonhole_sort(__A		)
 print('Sorted order is:'							,		' '.join(__A		)		)


if __name__ == "__main__":
  main()









"""simple docstring"""

from __future__ import annotations
def  __snake_case							(	__A      :						list[int]     )     ->       list[int]:






				'''simple docstring'''
				if len(__A     ) == 0:
								return array

				SCREAMING_SNAKE_CASE				,						SCREAMING_SNAKE_CASE						:							Optional[int]							=     min(__A     ), max(__A     )

				# Compute the variables
				SCREAMING_SNAKE_CASE						:							Optional[int]							=     _max - _min + 1
				SCREAMING_SNAKE_CASE				,						SCREAMING_SNAKE_CASE						:							List[str]							=     [0] * holes_range, [0] * holes_range

				# Make the sorting.
				for i in array:
								SCREAMING_SNAKE_CASE						:							List[Any]							=     i - _min
								SCREAMING_SNAKE_CASE						:							Dict							=     i
								holes_repeat[index] += 1

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

    # Returns the sorted array.
				return array


if __name__ == "__main__":
							import doctest

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





