
"""simple docstring"""





from __future__ import annotations







def       __a	(						__lowerCamelCase,						__lowerCamelCase,						__lowerCamelCase,						__lowerCamelCase    ):
   UpperCAmelCase_	,  UpperCAmelCase_   :   Any     	=       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       __a	(						):
   UpperCAmelCase_   :   Dict     	=       [[2, 5, 7], [4, 8, 13], [9, 11, 15], [12, 17, 20]]
   UpperCAmelCase_   :   Optional[Any]     	=       int(input("Enter the element to be searched:"    )    )
   print(__lowerCamelCase    )
   search_in_a_sorted_matrix(__lowerCamelCase,						len(__lowerCamelCase    ),						len(mat[0]    ),						__lowerCamelCase    )


if __name__ == "__main__":
    import doctest

    doctest.testmod()
    main()





def   UpperCamelCase(   lowercase_				)      ->							float:





  '''simple docstring'''





  return -num if num < 0 else num



def   UpperCamelCase(   lowercase_				)      ->							int:





  '''simple docstring'''





  if len(lowercase_				) == 0:
    raise ValueError("""abs_min() arg is an empty sequence"""				)
  snake_case_					= x[0]
  for i in x:
    if abs_val(lowercase_				) < abs_val(lowercase_				):
      snake_case_					= i
  return j



def   UpperCamelCase(   lowercase_				)      ->							int:





  '''simple docstring'''





  if len(lowercase_				) == 0:
    raise ValueError("""abs_max() arg is an empty sequence"""				)
  snake_case_					= x[0]
  for i in x:
    if abs(lowercase_				) > abs(lowercase_				):
      snake_case_					= i
  return j



def   UpperCamelCase(   lowercase_				)      ->							int:





  '''simple docstring'''





  if len(lowercase_				) == 0:
    raise ValueError("""abs_max_sort() arg is an empty sequence"""				)
  return sorted(lowercase_     ,   key=lowercase_				)[-1]



def   UpperCamelCase(   )      ->							List[Any]:





  '''simple docstring'''





  assert abs_val(0				) == 0
  assert abs_val(34				) == 34
  assert abs_val(-100000000000				) == 100000000000

  snake_case_					= [-3, -1, 2, -11]
  assert abs_max(lowercase_				) == -11
  assert abs_max_sort(lowercase_				) == -11
  assert abs_min(lowercase_				) == -1


if __name__ == "__main__":
    import doctest

    doctest.testmod()

    test_abs_val()
    print(abs_val(-34))  # --> 34