from __future__ import annotations







def 					__lowerCAmelCase				(		__SCREAMING_SNAKE_CASE       :					List[str]		,							__SCREAMING_SNAKE_CASE       :					List[Any]		,							__SCREAMING_SNAKE_CASE       :					Union[str, Any]		,							__SCREAMING_SNAKE_CASE       :					str   ):







    '''simple docstring'''
    __snake_case       :				str 			=    m - 1, 0
    while i >= 0 and j < n:
        if key == mat[i][j]:
            print(F'''Key {key} found at row- {i + 1} column- {j + 1}'''   )
            return
        if key < mat[i][j]:
            i -= 1
        else:
            j += 1
    print(F'''Key {key} not found'''   )







def 					__lowerCAmelCase				(		):







    '''simple docstring'''
    __snake_case       :				List[Any] 			=    [[2, 5, 7], [4, 8, 1_3], [9, 1_1, 1_5], [1_2, 1_7, 2_0]]
    __snake_case       :				Any 			=    int(input("""Enter the element to be searched:"""   )   )
    print(_UpperCamelCase   )
    search_in_a_sorted_matrix(_UpperCamelCase		,							len(_UpperCamelCase   )		,							len(mat[0]   )		,							_UpperCamelCase   )


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     main()








def 	_A	(   _UpperCamelCase			):
				if not isinstance(_UpperCamelCase      ,					_UpperCamelCase			):
								_UpperCAmelCase						:  List[Any]     					=	(
								    '''operation can not be conducted on a object of type '''
								    F'''{type(_UpperCamelCase			).__name__}'''
								)
								raise TypeError(_UpperCamelCase			)
				_UpperCAmelCase						:  List[str]     					=	''''''
				for _ in range(0      ,					32			):
								bit_string += str(number % 2			)
								_UpperCAmelCase						:  Union[str, Any]     					=	number >> 1
				return bit_string


def 	_A	(   _UpperCamelCase			):
				if number < 0:
								raise ValueError('''the value of input must be positive'''			)
				elif isinstance(_UpperCamelCase      ,					_UpperCamelCase			):
								raise TypeError('''Input value must be a \'int\' type'''			)
				elif isinstance(_UpperCamelCase      ,					_UpperCamelCase			):
								raise TypeError('''\'<\' not supported between instances of \'str\' and \'int\''''			)
				_UpperCAmelCase						:  Tuple     					=	0
				# iterator over [1 to 32],since we are dealing with 32 bit integer
				for _ in range(1      ,					33			):
								# left shift the bits by unity
								_UpperCAmelCase						:  List[str]     					=	result << 1
								# get the end bit
								_UpperCAmelCase						:  List[Any]     					=	number % 2
								# right shift the bits by unity
								_UpperCAmelCase						:  Optional[int]     					=	number >> 1
								# add that bit to our ans
								_UpperCAmelCase						:  Any     					=	result | end_bit
				return get_reverse_bit_string(_UpperCamelCase			)


if __name__ == "__main__":
					import doctest

					doctest.testmod()
