




from __future__ import annotations

lowerCAmelCase_            =			[-10, -5, 0, 5, 5.1, 11, 13, 21, 3, 4, -21, -10, -5, -1, 0]
lowerCAmelCase_            =			[-5, 0, 5, 5.1, 11, 13, 21, -1, 4, -1, -10, -5, -1, 0, -1]



def   __lowerCAmelCase      (       UpperCamelCase   )  ->						Any:
  lowerCAmelCase__					:	Optional[Any]									=  []
  lowerCAmelCase__					:	int									=  len(a_   )

  for i in range(a_   ):
    lowerCAmelCase__					:	Optional[Any]									=  -1
    for j in range(i + 1						,   a_   ):
      if arr[i] < arr[j]:
        lowerCAmelCase__					:	Dict									=  arr[j]
        break
    result.append(a_   )
  return result



def   __lowerCAmelCase      (       UpperCamelCase   )  ->						Tuple:
  lowerCAmelCase__					:	Tuple									=  []
  for i, outer in enumerate(a_   ):
    lowerCAmelCase__					:	Union[str, Any]									=  -1
    for inner in arr[i + 1 :]:
      if outer < inner:
        lowerCAmelCase__					:	Any									=  inner
        break
    result.append(a_   )
  return result



def   __lowerCAmelCase      (       UpperCamelCase   )  ->						Dict:
  lowerCAmelCase__					:	Tuple									=  len(a_   )
  lowerCAmelCase__					:	Union[str, Any]									=  []
  lowerCAmelCase__					:	str									=  [-1] * arr_size

  for index in reversed(range(a_   )   ):
    if stack:
      while stack[-1] <= arr[index]:
        stack.pop()
        if not stack:
          break
    if stack:
      lowerCAmelCase__					:	Optional[int]									=  stack[-1]
    stack.append(arr[index]   )
  return result


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

     testmod()
     print(next_greatest_element_slow(arr))
     print(next_greatest_element_fast(arr))
     print(next_greatest_element(arr))

     lowerCAmelCase_            =			(
         """from __main__ import arr, next_greatest_element_slow, """
         """next_greatest_element_fast, next_greatest_element"""
     )
     print(
         """next_greatest_element_slow():""",
         timeit("""next_greatest_element_slow(arr)""", setup=setup),
     )
     print(
         """next_greatest_element_fast():""",
         timeit("""next_greatest_element_fast(arr)""", setup=setup),
     )
     print(
         """     next_greatest_element():""",
         timeit("""next_greatest_element(arr)""", setup=setup),
     )









lowercase    				=   {
    "A": ".-", "B": "-...", "C": "-.-.", "D": "-..", "E": ".", "F": "..-.", "G": "--.",
    "H": "....", "I": "..", "J": ".---", "K": "-.-", "L": ".-..", "M": "--", "N": "-.",
    "O": "---", "P": ".--.", "Q": "--.-", "R": ".-.", "S": "...", "T": "-", "U": "..-",
    "V": "...-", "W": ".--", "X": "-..-", "Y": "-.--", "Z": "--..", "1": ".----",
    "2": "..---", "3": "...--", "4": "....-", "5": ".....", "6": "-....", "7": "--...",
    "8": "---..", "9": "----.", "0": "-----", "&": ".-...", "@": ".--.-.",
    ":": "---...", ",": "--..--", ".": ".-.-.-", "'": ".----.", "\"": ".-..-.",
    "?": "..--..", "/": "-..-.", "=": "-...-", "+": ".-.-.", "-": "-....-",
    "(": "-.--.", ")": "-.--.-", "!": "-.-.--", " ": "/"
}  # Exclamation mark is not in ITU-R recommendation
# fmt: on
lowercase    				=   {value: key for key, value in MORSE_CODE_DICT.items()}





def 		__UpperCAmelCase     (	a_):
							return " ".join(MORSE_CODE_DICT[char] for char in message.upper())





def 		__UpperCAmelCase     (	a_):
							return "".join(REVERSE_DICT[char] for char in message.split())





def 		__UpperCAmelCase     (	):
							snake_case_           =				'Morse code here!'
							print(a_)
							snake_case_           =				encrypt(a_)
							print(a_)
							snake_case_           =				decrypt(a_)
							print(a_)


if __name__ == "__main__":
	main()





