



from __future__ import annotations

from random import choice


def A						(       __UpperCamelCase					)						->      Optional[Any]:
			return choice(__UpperCamelCase					)


def A						(       __UpperCamelCase ,	__UpperCamelCase					)						->      int:
			A__       =    random_pivot(__UpperCamelCase					)

			# partition based on pivot
			# linear time
			A__       =    [e for e in lst if e < pivot]
			A__       =    [e for e in lst if e > pivot]

			# if we get lucky, pivot might be the element we want.
			# we can easily see this:
			# small (elements smaller than k)
			# + pivot (kth element)
			# + big (elements larger than k)
			if len(__UpperCamelCase					) == k - 1:
						return pivot
			# pivot is in elements bigger than k
			elif len(__UpperCamelCase					) < k - 1:
						return kth_number(__UpperCamelCase ,	k - len(__UpperCamelCase					) - 1					)
			# pivot is in elements smaller than k
			else:
						return kth_number(__UpperCamelCase ,	__UpperCamelCase					)


if __name__ == "__main__":
							import doctest

							doctest.testmod()









def A						(       __UpperCamelCase					)						->      bool:
			return number & 1 == 0


if __name__ == "__main__":
							import doctest

							doctest.testmod()




