
from __future__ import annotations

from dataclasses import dataclass







@dataclass
class     __lowerCAmelCase					:
			UpperCamelCase           =  4_2
			UpperCamelCase           =  None
			UpperCamelCase           =  None





def 							A			(  _UpperCAmelCase       :     TreeNode | None					)       ->				int:







			'''simple docstring'''


			def is_valid_tree(_UpperCAmelCase       :     TreeNode | None					) -> bool:
						if node is None:
									return True

						if not isinstance(_UpperCamelCase							,     _UpperCamelCase					):
									return False

						try:
									float(node.data					)
						except (TypeError, ValueError):
									return False

						return is_valid_tree(node.left					) and is_valid_tree(node.right					)

			if not is_valid_tree(_UpperCamelCase					):
						raise ValueError(
						    'Each node should be type of TreeNode and data should be float.'					)

			def is_binary_search_tree_recursive_check(
			    _UpperCAmelCase       :     TreeNode | None							,     _UpperCAmelCase       :     float							,     _UpperCAmelCase       :     float					) -> bool:

						if node is None:
									return True

						return (
						    left_bound < node.data < right_bound
						    and is_binary_search_tree_recursive_check(node.left							,     _UpperCamelCase							,     node.data					)
						    and is_binary_search_tree_recursive_check(
						        node.right							,     node.data							,     _UpperCamelCase					)
						)

			return is_binary_search_tree_recursive_check(_UpperCamelCase							,     -float('inf'					)							,     float('inf'					)					)


if __name__ == "__main__":
							import doctest

							doctest.testmod()





def 							A			(  _UpperCAmelCase       :     list					)       ->				list:







			'''simple docstring'''
			if len(_UpperCAmelCase					) <= 1:
						return lst

			_UpperCAmelCase	 =     1

			while i < len(_UpperCAmelCase					):
						if lst[i - 1] <= lst[i]:
									i += 1
						else:
									_UpperCAmelCase ,  _UpperCAmelCase	 =     lst[i], lst[i - 1]
									i -= 1
									if i == 0:
												_UpperCAmelCase	 =     1

			return lst


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