





"""simple docstring"""




def  a_       (							_lowercase ,		_lowercase ,		_lowercase     ):
						if right <= left:
												return
						_UpperCamelCase    :      Optional[Any]						     =					left
						_UpperCamelCase    :      Any						     =					right
						_UpperCamelCase    :      List[Any]						     =					sorting[left]
						while i <= b:
												if sorting[i] < pivot:
																		_UpperCamelCase     ,							_UpperCamelCase    :      Dict						     =					sorting[i], sorting[a]
																		a += 1
																		i += 1
												elif sorting[i] > pivot:
																		_UpperCamelCase     ,							_UpperCamelCase    :      Optional[int]						     =					sorting[i], sorting[b]
																		b -= 1
												else:
																		i += 1
						quick_sort_apartition(lowercase__ ,		lowercase__ ,		a - 1     )
						quick_sort_apartition(lowercase__ ,		b + 1 ,		lowercase__     )





def  a_       (							_lowercase ,		_lowercase ,		_lowercase     ):
						if left < right:
												_UpperCamelCase    :      Union[str, Any]						     =					lomuto_partition(lowercase__ ,		lowercase__ ,		lowercase__     )
												quick_sort_lomuto_partition(lowercase__ ,		lowercase__ ,		pivot_index - 1     )
												quick_sort_lomuto_partition(lowercase__ ,		pivot_index + 1 ,		lowercase__     )





def  a_       (							_lowercase ,		_lowercase ,		_lowercase     ):
						_UpperCamelCase    :      List[Any]						     =					sorting[right]
						_UpperCamelCase    :      str						     =					left
						for i in range(lowercase__ ,		lowercase__     ):
												if sorting[i] < pivot:
																		_UpperCamelCase     ,							_UpperCamelCase    :      str						     =					sorting[i], sorting[store_index]
																		store_index += 1
						_UpperCamelCase     ,							_UpperCamelCase    :      Optional[int]						     =					sorting[store_index], sorting[right]
						return store_index





def  a_       (							_lowercase     ):
						if len(lowercase__     ) <= 1:
												return sorting
						return (
						    three_way_radix_quicksort([i for i in sorting if i < sorting[0]]     )
						    + [i for i in sorting if i == sorting[0]]
						    + three_way_radix_quicksort([i for i in sorting if i > sorting[0]]     )
						)


if __name__ == "__main__":
							import doctest

							doctest.testmod(verbose=True)

							UpperCamelCase_     =input("""Enter numbers separated by a comma:\n""").strip()
							UpperCamelCase_     =[int(item) for item in user_input.split(""",""")]
							quick_sort_apartition(unsorted, 0, len(unsorted) - 1)
							print(unsorted)










"""simple docstring"""




def  a_       (							_lowercase     ):
						return 1 if input_a == 0 else 0





def  a_       (							):
						assert not_gate(0     ) == 1
						assert not_gate(1     ) == 0


if __name__ == "__main__":
						print(not_gate(0))
						print(not_gate(1))



