



"""simple docstring"""
from ... import PretrainedConfig


_UpperCAmelCase     =			{
    """sijunhe/nezha-cn-base""": """https://huggingface.co/sijunhe/nezha-cn-base/resolve/main/config.json""",
}
class 					a	(  UpperCAmelCase__       ):
  UpperCamelCase	:				str     						=					NEZHA_PRETRAINED_CONFIG_ARCHIVE_MAP
  UpperCamelCase	:				Optional[Any]     						=					'nezha'



  def __init__(						self :					Dict       ,		lowerCAmelCase :					List[str]=2_1128       ,		lowerCAmelCase :					Any=768       ,		lowerCAmelCase :					Optional[Any]=12       ,		lowerCAmelCase :					List[str]=12       ,		lowerCAmelCase :					Optional[Any]=3072       ,		lowerCAmelCase :					Optional[int]="gelu"       ,		lowerCAmelCase :					Any=0.1       ,		lowerCAmelCase :					List[str]=0.1       ,		lowerCAmelCase :					Tuple=512       ,		lowerCAmelCase :					Any=64       ,		lowerCAmelCase :					Optional[int]=2       ,		lowerCAmelCase :					Union[str, Any]=0.0_2       ,		lowerCAmelCase :					List[Any]=1E-12       ,		lowerCAmelCase :					int=0.1       ,		lowerCAmelCase :					int=0       ,		lowerCAmelCase :					Any=2       ,		lowerCAmelCase :					Optional[int]=3       ,		lowerCAmelCase :					int=True       ,		**lowerCAmelCase :					Dict       ,		)     ->					Optional[int]:


     '''simple docstring'''




     super().__init__(pad_token_id=lowerCAmelCase       ,		bos_token_id=lowerCAmelCase       ,		eos_token_id=lowerCAmelCase       ,		**lowerCAmelCase		)

     SCREAMING_SNAKE_CASE_: Union[str, Any]     			=vocab_size
     SCREAMING_SNAKE_CASE_: Optional[Any]     			=hidden_size
     SCREAMING_SNAKE_CASE_: Tuple     			=num_hidden_layers
     SCREAMING_SNAKE_CASE_: Any     			=num_attention_heads
     SCREAMING_SNAKE_CASE_: Any     			=hidden_act
     SCREAMING_SNAKE_CASE_: Optional[int]     			=intermediate_size
     SCREAMING_SNAKE_CASE_: int     			=hidden_dropout_prob
     SCREAMING_SNAKE_CASE_: Any     			=attention_probs_dropout_prob
     SCREAMING_SNAKE_CASE_: int     			=max_position_embeddings
     SCREAMING_SNAKE_CASE_: Optional[int]     			=max_relative_position
     SCREAMING_SNAKE_CASE_: Union[str, Any]     			=type_vocab_size
     SCREAMING_SNAKE_CASE_: Optional[int]     			=initializer_range
     SCREAMING_SNAKE_CASE_: Any     			=layer_norm_eps
     SCREAMING_SNAKE_CASE_: List[str]     			=classifier_dropout
     SCREAMING_SNAKE_CASE_: str     			=use_cache








"""simple docstring"""
def      __magic_name__				(							lowercase ):
   if upper_limit < 0:
      raise ValueError("""Limit for the Catalan sequence must be ≥ 0""" )

   SCREAMING_SNAKE_CASE_: Tuple     			=[0] * (upper_limit + 1)

   # Base case: C(0) = C(1) = 1
   SCREAMING_SNAKE_CASE_: Any     			=1
   if upper_limit > 0:
      SCREAMING_SNAKE_CASE_: List[str]     			=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:
         _UpperCAmelCase     =			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()



