


"""simple docstring"""




import string

def        lowercase							(		lowerCAmelCase__ :     str			) ->      str:
		__a           =			''''''
		for i in sequence:
				__a           =			ord(lowerCAmelCase__			)
				if 65 <= extract <= 90:
						output += chr(155 - extract			)
				elif 97 <= extract <= 122:
						output += chr(219 - extract			)
				else:
						output += i
		return output

def        lowercase							(		lowerCAmelCase__ :     str			) ->      str:
		__a           =			string.ascii_letters
		__a           =			string.ascii_lowercase[::-1] + string.ascii_uppercase[::-1]
		return "".join(
		    letters_reversed[letters.index(lowerCAmelCase__			)] if c in letters else c for c in sequence			)

def        lowercase							(		) ->      None:
		from timeit import timeit

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


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












def SCREAMING_SNAKE_CASE				(       lowercase_						)   ->       "list[int]":



       """simple docstring"""

       if upper_limit < 0:
              raise ValueError('''Limit for the Catalan sequence must be ≥ 0'''						)

       A__       =    [0] * (upper_limit + 1)

       # Base case: C(0) = C(1) = 1
       A__       =    1
       if upper_limit > 0:
              A__       =    1

       # Recurrence relation: C(i) = sum(C(j).C(i-j-1)), from j = 0 to i
       for i in range(2 ,				upper_limit + 1						):
              for j in range(lowercase_						):
                     catalan_list[i] += catalan_list[j] * catalan_list[i - j - 1]

       return catalan_list


if __name__ == "__main__":
  print("""\n********* Catalan Numbers Using Dynamic Programming ************\n""")
  print("""\n*** Enter -1 at any time to quit ***""")
  print("""\nEnter the upper limit (≥ 0) for the Catalan number sequence: """, end="""""")
  try:
    while True:
      _lowerCamelCase	:		List[Any]							       =   int(input().strip())
      if N < 0:
        print("""\n********* Goodbye!! ************""")
        break
      else:
        print(F'''The Catalan numbers from 0 through {N} are:''')
        print(catalan_numbers(N))
        print("""Try another upper limit for the sequence: """, end="""""")
  except (NameError, ValueError):
    print("""\n********* Invalid input, goodbye! ************\n""")

  import doctest

  doctest.testmod()


