



from __future__ import annotations

from collections.abc import Iterable, Iterator
from typing import Any, Generic, TypeVar

__magic_name__       =     TypeVar('''T''', bound=bool)


class 	a__       (       Generic[T]       ):


					"""simple docstring"""



					def __init__(		self     :Optional[Any]      ,  lowercase__     :T    ):
										lowercase						   =       value
										lowercase						   =       None
										lowercase						   =       None

					@property
					def 				__UpperCAmelCase		(		self     :Any    ):
										return self._value



					@staticmethod
					def 				__UpperCAmelCase		(		lowercase__     :SkewNode[T] | None      ,  lowercase__     :SkewNode[T] | None    ):
										if not roota:
															return roota

										if not roota:
															return roota

										if roota.value > roota.value:
															lowercase   ,      lowercase						   =       roota, roota

										lowercase						   =       roota
										lowercase						   =       roota.right
										lowercase						   =       roota.left
										lowercase						   =       SkewNode.merge(_lowerCAmelCase      ,  _lowerCAmelCase    )

										return result




class 	a__       (       Generic[T]       ):


					"""simple docstring"""



					def __init__(		self     :int      ,  lowercase__     :Iterable[T] | None = ()    ):
										lowercase						   =       None
										if data:
															for item in data:
																				self.insert(_lowerCAmelCase    )

					def __bool__(		self     :Union[str, Any]    ):
										return self._root is not None

					def __iter__(		self     :int    ):
										lowercase						   =       []
										while self:
															result.append(self.pop()    )

										# Pushing items back to the heap not to clear it.
										for item in result:
															self.insert(_lowerCAmelCase    )

										return iter(_lowerCAmelCase    )

					def 				__UpperCAmelCase		(		self     :Optional[int]      ,  lowercase__     :T    ):
										lowercase						   =       SkewNode.merge(self._root      ,  SkewNode(_lowerCAmelCase    )    )

					def 				__UpperCAmelCase		(		self     :List[str]    ):
										lowercase						   =       self.top()
										lowercase						   =       (
										    SkewNode.merge(self._root.left      ,  self._root.right    ) if self._root else None
										)

										return result

					def 				__UpperCAmelCase		(		self     :Tuple    ):
										if not self._root:
															raise IndexError('Can\'t get top element for the empty heap.'    )
										return self._root.value



					def 				__UpperCAmelCase		(		self     :int    ):
										lowercase						   =       None


if __name__ == "__main__":
		import doctest

		doctest.testmod()








import random



def 	_a  (					__SCREAMING_SNAKE_CASE					:  str    ):






  """simple docstring"""




  def is_sorted(__SCREAMING_SNAKE_CASE					:  str    ):
    for i in range(len(__SCREAMING_SNAKE_CASE    ) - 1    ):
      if collection[i] > collection[i + 1]:
        return False
    return True

  while not is_sorted(__SCREAMING_SNAKE_CASE    ):
    random.shuffle(__SCREAMING_SNAKE_CASE    )
  return collection


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