


'''simple docstring'''

from __future__ import annotations

lowerCAmelCase				:int        =      [-1_0, -5, 0, 5, 5.1, 1_1, 1_3, 2_1, 3, 4, -2_1, -1_0, -5, -1, 0]
lowerCAmelCase				:Optional[Any]        =      [-5, 0, 5, 5.1, 1_1, 1_3, 2_1, -1, 4, -1, -1_0, -5, -1, 0, -1]





def lowerCamelCase      (      lowerCAmelCase    :     list[float]		):





	"""simple docstring"""







	__magic_name__	:   Optional[int]					     =					[]
	__magic_name__	:   List[str]					     =					len(snake_case__		)

	for i in range(snake_case__		):
		__magic_name__	:   List[str]					     =					-1
		for j in range(i + 1		,		snake_case__		):
			if arr[i] < arr[j]:
				__magic_name__	:   Any					     =					arr[j]
				break
		result.append(snake_case__		)
	return result





def lowerCamelCase      (      lowerCAmelCase    :     list[float]		):





	"""simple docstring"""







	__magic_name__	:   Optional[Any]					     =					[]
	for i, outer in enumerate(snake_case__		):
		__magic_name__	:   int					     =					-1
		for inner in arr[i + 1 :]:
			if outer < inner:
				__magic_name__	:   Union[str, Any]					     =					inner
				break
		result.append(snake_case__		)
	return result





def lowerCamelCase      (      lowerCAmelCase    :     list[float]		):





	"""simple docstring"""







	__magic_name__	:   str					     =					len(snake_case__		)
	__magic_name__	:   Dict					     =					[]
	__magic_name__	:   Optional[int]					     =					[-1] * arr_size

	for index in reversed(range(snake_case__		)		):
		if stack:
			while stack[-1] <= arr[index]:
				stack.pop()
				if not stack:
					break
		if stack:
			__magic_name__	:   List[str]					     =					stack[-1]
		stack.append(arr[index]		)
	return result


if __name__ == "__main__":
			from doctest import testmod
			from timeit import timeit

			testmod()
			print(next_greatest_element_slow(arr))
			print(next_greatest_element_fast(arr))
			print(next_greatest_element(arr))

			lowerCAmelCase				:Optional[int]        =      (
			    '''from __main__ import arr, next_greatest_element_slow, '''
			    '''next_greatest_element_fast, next_greatest_element'''
			)
			print(
			    '''next_greatest_element_slow():''',
			    timeit('''next_greatest_element_slow(arr)''', setup=setup),
			)
			print(
			    '''next_greatest_element_fast():''',
			    timeit('''next_greatest_element_fast(arr)''', setup=setup),
			)
			print(
			    '''     next_greatest_element():''',
			    timeit('''next_greatest_element(arr)''', setup=setup),
			)



'''simple docstring'''

def lowerCamelCase      (      lowerCAmelCase    :     str		):





	"""simple docstring"""







	return "".join(chr(ord(lowerCAmelCase		) - 32		) if 'a' <= char <= 'z' else char for char in word		)


if __name__ == "__main__":
							from doctest import testmod

							testmod()