





'''simple docstring'''



import string




def 				snake_case_      (		SCREAMING_SNAKE_CASE__       ):







  '''simple docstring'''



  _snake_case     		=				""
  for i in sequence:
    _snake_case     		=				ord(SCREAMING_SNAKE_CASE__       )
    if 65 <= extract <= 90:
      output += chr(1_55 - extract       )
    elif 97 <= extract <= 1_22:
      output += chr(2_19 - extract       )
    else:
      output += i
  return output




def 				snake_case_      (		SCREAMING_SNAKE_CASE__       ):







  '''simple docstring'''



  _snake_case     		=				string.ascii_letters
  _snake_case     		=				string.ascii_lowercase[::-1] + string.ascii_uppercase[::-1]
  return "".join(
      letters_reversed[letters.index(SCREAMING_SNAKE_CASE__       )] if c in letters else c for c in sequence       )




def 				snake_case_      (		):







  '''simple docstring'''



  from timeit import timeit

  print("Running performance benchmarks..."       )
  _snake_case     		=				"from string import printable ; from __main__ import atbash, atbash_slow"
  print(f'''> atbash_slow(): {timeit("atbash_slow(printable)"					,	setup=SCREAMING_SNAKE_CASE__       )} seconds'''       )
  print(f'''>      atbash(): {timeit("atbash(printable)"					,	setup=SCREAMING_SNAKE_CASE__       )} seconds'''       )


if __name__ == "__main__":
 for example in ("ABCDEFGH", "123GGjj", "testStringtest", "with space"):
  print(F'{example} encrypted in atbash: {atbash(example)}')
 benchmark()









'''simple docstring'''



import functools




def 				snake_case_      (		SCREAMING_SNAKE_CASE__					,	SCREAMING_SNAKE_CASE__       ):







  '''simple docstring'''



  _snake_case     		=				len(SCREAMING_SNAKE_CASE__       )
  _snake_case     		=				len(SCREAMING_SNAKE_CASE__       )

  @functools.cache
  def min_distance(SCREAMING_SNAKE_CASE__					,	SCREAMING_SNAKE_CASE__       ) -> int:
    # if first word index is overflow - delete all from the second word
    if indexa >= len_worda:
      return len_worda - indexa
    # if second word index is overflow - delete all from the first word
    if indexa >= len_worda:
      return len_worda - indexa
    _snake_case     		=				int(worda[indexa] != worda[indexa]       )  # current letters not identical
    return min(
        1 + min_distance(indexa + 1					,	SCREAMING_SNAKE_CASE__       )					,	1 + min_distance(SCREAMING_SNAKE_CASE__					,	indexa + 1       )					,	diff + min_distance(indexa + 1					,	indexa + 1       )					,	)

  return min_distance(0					,	0       )


if __name__ == "__main__":
 import doctest

 doctest.testmod()


