



"""simple docstring"""
class 							lowerCamelCase    :






					'''simple docstring'''





					def __init__(			self:				Dict		)  ->      Dict:
											snake_case_					:List[str]		=     []
											snake_case_					:str		=     0
											snake_case_					:Optional[Any]		=     0






					def __str__(			self:				Optional[Any]		)  ->      Any:
											snake_case_					:Optional[int]		=     """<""" + str(self.entries		)[1:-1] + """>"""
											return printed






					def   lowerCAmelCase_							(			self:				Tuple		,	snake_case:				Tuple		)  ->      Any:
											self.entries.append(snake_case		)
											snake_case_					:Tuple		=     self.length + 1






					def   lowerCAmelCase_							(			self:				Optional[Any]		)  ->      Optional[Any]:
											snake_case_					:List[str]		=     self.length - 1
											snake_case_					:Union[str, Any]		=     self.entries[self.front]
											# self.front-=1
											# self.entries = self.entries[self.front:]
											snake_case_					:Optional[int]		=     self.entries[1:]
											return dequeued






					def   lowerCAmelCase_							(			self:				str		,	snake_case:				Optional[int]		)  ->      Union[str, Any]:
											for _ in range(snake_case		):
																	self.put(self.get()		)






					def   lowerCAmelCase_							(			self:				List[str]		)  ->      List[str]:
											return self.entries[0]






					def   lowerCAmelCase_							(			self:				List[Any]		)  ->      Union[str, Any]:
											return self.length





"""simple docstring"""
def   A_    (     _lowercase,   _lowercase,   _lowercase,   _lowercase      ):







						'''simple docstring'''


						snake_case_					:Dict		=     int((lower_bound + upper_bound) // 2      )
						if array[r] == value:
												return r
						if lower_bound >= upper_bound:
												return -1
						if array[r] < value:
												return binary_search(_lowercase,   r + 1,   _lowercase,   _lowercase      )
						else:
												return binary_search(_lowercase,   _lowercase,   r - 1,   _lowercase      )
def   A_    (     _lowercase,   _lowercase      ):







						'''simple docstring'''


						snake_case_					:Any		=     0
						if matrix[index][0] == value:
												return [index, 0]
						while index < len(_lowercase      ) and matrix[index][0] < value:
												snake_case_					:List[str]		=     binary_search(matrix[index],   0,   len(matrix[index]      ) - 1,   _lowercase      )
												if r != -1:
																		return [index, r]
												index += 1
						return [-1, -1]


if __name__ == "__main__":
						import doctest

						doctest.testmod()
