



"""simple docstring"""





def 	UpperCAmelCase     (		A	:						Any     ,				A	:						Optional[Any]       ):

		'''simple docstring'''


		_UpperCAmelCase							 =		[1]
		for i in range(2     ,				A       ):
				factorials.append(factorials[-1] * i       )
		assert 0 <= k < factorials[-1] * n, "k out of bounds"

		_UpperCAmelCase							 =		[]
		_UpperCAmelCase							 =		list(range(A       )       )

		# Find permutation
		while factorials:
				_UpperCAmelCase							 =		factorials.pop()
				_UpperCAmelCase ,					_UpperCAmelCase							 =		divmod(A     ,				A       )
				permutation.append(elements[number]       )
				elements.remove(elements[number]       )
		permutation.append(elements[0]       )

		return permutation


if __name__ == "__main__":
					import doctest

					doctest.testmod()







"""simple docstring"""





def 	UpperCAmelCase     (		A	:						int       ):

		'''simple docstring'''


		_UpperCAmelCase							 =		[[0 for _ in range(A       )] for _ in range(m + 1       )]
		for i in range(m + 1       ):
				_UpperCAmelCase							 =		1

		for n in range(m + 1       ):
				for k in range(1     ,				A       ):
						memo[n][k] += memo[n][k - 1]
						if n - k > 0:
								memo[n][k] += memo[n - k - 1][k]

		return memo[m][m - 1]


if __name__ == "__main__":
					import sys

					if len(sys.argv) == 1:
										try:
															lowercase  							=					int(input('''Enter a number: ''').strip())
															print(partition(n))
										except ValueError:
															print('''Please enter a number.''')
					else:
										try:
															lowercase  							=					int(sys.argv[1])
															print(partition(n))
										except ValueError:
															print('''Please pass a number.''')


