



class     __a			:



	def __init__(    self				:     str					,						snake_case_				:     int)->				None:
						__lowerCAmelCase						 =size
						__lowerCAmelCase						 =[0] * size
						__lowerCAmelCase						 =[0] * size



	@staticmethod
	def 		UpperCamelCase				(    snake_case_				:     int)->				int:
						return index | (index + 1)



	@staticmethod
	def 		UpperCamelCase				(    snake_case_				:     int)->				int:
						return (index & (index + 1)) - 1



	def 		UpperCamelCase				(    self				:     Union[str, Any]					,						snake_case_				:     int					,						snake_case_				:     int)->				None:
						__lowerCAmelCase						 =value
						while index < self.size:
											__lowerCAmelCase						 =self.get_prev(snake_case_) + 1
											if current_left_border == index:
																__lowerCAmelCase						 =value
											else:
																__lowerCAmelCase						 =max(snake_case_					,						snake_case_					,						snake_case_)
											__lowerCAmelCase						 =self.get_next(snake_case_)



	def 		UpperCamelCase				(    self				:     int					,						snake_case_				:     int					,						snake_case_				:     int)->				int:
						right -= 1  # Because of right is exclusive
						__lowerCAmelCase						 =0
						while left <= right:
											__lowerCAmelCase						 =self.get_prev(snake_case_)
											if left <= current_left:
																__lowerCAmelCase						 =max(snake_case_					,						self.tree[right])
																__lowerCAmelCase						 =current_left
											else:
																__lowerCAmelCase						 =max(snake_case_					,						self.arr[right])
																right -= 1
						return result


if __name__ == "__main__":
				import doctest

				doctest.testmod()









def        __lowerCAmelCase		(	__lowerCamelCase						:     int					, __lowerCamelCase						:     int						)	->    bool:
					return numa ^ numa < 0


if __name__ == "__main__":
				import doctest

				doctest.testmod()




