



def 							A							(   _lowerCamelCase							,					_lowerCamelCase    ):





							'''simple docstring'''




							assert x is not None
							assert y is not None

							_lowerCAmelCase	:				Tuple					  =       len(_SCREAMING_SNAKE_CASE    )
							_lowerCAmelCase	:				Optional[Any]					  =       len(_SCREAMING_SNAKE_CASE    )

							# declaring the array for storing the dp values
							_lowerCAmelCase	:				List[Any]					  =       [[0] * (n + 1) for _ in range(m + 1    )]  # noqa: E741

							for i in range(1							,					m + 1    ):
														for j in range(1							,					n + 1    ):
																					_lowerCAmelCase	:				Union[str, Any]					  =       1 if x[i - 1] == y[j - 1] else 0

																					_lowerCAmelCase	:				Dict					  =       max(l[i - 1][j]							,					l[i][j - 1]							,					l[i - 1][j - 1] + match    )

							_lowerCAmelCase	:				Any					  =       ""
							_lowerCAmelCase  ,       _lowerCAmelCase	:				Optional[Any]					  =       m, n
							while i > 0 and j > 0:
														_lowerCAmelCase	:				Tuple					  =       1 if x[i - 1] == y[j - 1] else 0

														if l[i][j] == l[i - 1][j - 1] + match:
																					if match == 1:
																												_lowerCAmelCase	:				Dict					  =       x[i - 1] + seq
																					i -= 1
																					j -= 1
														elif l[i][j] == l[i - 1][j]:
																					i -= 1
														else:
																					j -= 1

							return l[m][n], seq


if __name__ == "__main__":
						_snake_case						=    "AGGTAB"
						_snake_case						=    "GXTXAYB"
						_snake_case						=    4
						_snake_case						=    "GTAB"

						_snake_case,		_snake_case						=    longest_common_subsequence(a, b)
						print("len =", ln, ", sub-sequence =", subseq)
						import doctest

						doctest.testmod()




'''simple docstring'''





import math






def 						UpperCAmelCase__(				_SCREAMING_SNAKE_CASE					: int ):






			"""simple docstring"""




			if not isinstance(_SCREAMING_SNAKE_CASE,_SCREAMING_SNAKE_CASE ):
						__A=	f"""Input value of [number={number}] must be an integer"""
						raise TypeError(_SCREAMING_SNAKE_CASE )

			if number < 1:
						__A=	f"""Input value of [number={number}] must be > 0"""
						raise ValueError(_SCREAMING_SNAKE_CASE )
			elif number == 1:
						return 3
			elif number == 2:
						return 5
			else:
						__A=	int(math.log(number // 3,2 ) ) + 2

						__A=	[3, 5]
						__A=	2
						__A=	3
						for block in range(1,_SCREAMING_SNAKE_CASE ):
									for _ in range(_SCREAMING_SNAKE_CASE ):
												proth_list.append(2 ** (block + 1) + proth_list[proth_index - 1] )
												proth_index += 1
									increment *= 2

			return proth_list[number - 1]


if __name__ == "__main__":
					import doctest

					doctest.testmod()

					for number in range(1_1):
										UpperCAmelCase__  			=				0
										try:
															UpperCAmelCase__  			=				proth(number)
										except ValueError:
															print(F"""ValueError: there is no {number}th Proth number""")
															continue

										print(F"""The {number}th Proth number: {value}""")



