


from __future__ import annotations

import math







def 				lowerCAmelCase_     (					__lowerCamelCase							,	__lowerCamelCase							,	__lowerCamelCase							,	__lowerCamelCase							,	__lowerCamelCase	):





							if depth < 0:
														raise ValueError("Depth cannot be less than 0"	)

							if not scores:
														raise ValueError("Scores cannot be empty"	)

							if depth == height:
														return scores[node_index]

							return (
							    max(
							        minimax(depth + 1							,	node_index * 2							,	lowerCamelCase__							,	lowerCamelCase__							,	lowerCamelCase__	)							,	minimax(depth + 1							,	node_index * 2 + 1							,	lowerCamelCase__							,	lowerCamelCase__							,	lowerCamelCase__	)							,	)
							    if is_max
							    else min(
							        minimax(depth + 1							,	node_index * 2							,	lowerCamelCase__							,	lowerCamelCase__							,	lowerCamelCase__	)							,	minimax(depth + 1							,	node_index * 2 + 1							,	lowerCamelCase__							,	lowerCamelCase__							,	lowerCamelCase__	)							,	)
							)







def 				lowerCAmelCase_     (					):
							__snake_case		:			List[Any]							 =   [9_0, 2_3, 6, 3_3, 2_1, 6_5, 1_2_3, 3_4_4_2_3]
							__snake_case		:			str							 =   math.log(len(lowerCamelCase__	)							,	2	)
							print(F'Optimal value : {minimax(0							,	0							,	lowerCamelCase__							,	lowerCamelCase__							,	lowerCamelCase__	)}'	)


if __name__ == "__main__":
			import doctest

			doctest.testmod()
			main()






'''simple docstring'''




from string import ascii_lowercase, ascii_uppercase



def 	a			( lowerCamelCase__    ):
			'''simple docstring'''





			if not sentence:
						return ""
			A_	:						Optional[int]	=     dict(zip(lowerCamelCase__						,      lowerCamelCase__    )    )
			return lower_to_upper.get(sentence[0]						,      sentence[0]    ) + sentence[1:]


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

						testmod()