
import timeit







class 	A_       :




	'''simple docstring'''


	def __init__(	self		,   snake_case	):


		if isinstance(lowerCAmelCase__		,   lowerCAmelCase__	):  # Initializes a matrix identical to the one provided.
			lowercase					  =   arg
			lowercase					  =   len(lowerCAmelCase__	)
		else:  # Initializes a square matrix of the given size and set values to zero.
			lowercase					  =   arg
			lowercase					  =   [[0 for _ in range(self.n	)] for _ in range(self.n	)]





	def __mul__(	self		,   snake_case	):
		lowercase					  =   Matrix(self.n	)
		for i in range(self.n	):
			for j in range(self.n	):
				for k in range(self.n	):
					matrix.t[i][j] += self.t[i][k] * b.t[k][j]
		return matrix






def 							UpperCAmelCase_		(							__SCREAMING_SNAKE_CASE			,							__SCREAMING_SNAKE_CASE							):
	lowercase					  =   Matrix([[1, 0], [0, 1]]							)
	while b > 0:
		if b & 1:
			matrix *= a
		a *= a
		b >>= 1
	return matrix






def 							UpperCAmelCase_		(							__SCREAMING_SNAKE_CASE			,							__SCREAMING_SNAKE_CASE			,							__SCREAMING_SNAKE_CASE							):



	if n == 1:
		return fa
	elif n == 2:
		return fa
	lowercase					  =   Matrix([[1, 1], [1, 0]]							)
	lowercase					  =   modular_exponentiation(__SCREAMING_SNAKE_CASE			,							n - 2							)
	return fa * matrix.t[0][0] + fa * matrix.t[0][1]






def 							UpperCAmelCase_		(							__SCREAMING_SNAKE_CASE			,							__SCREAMING_SNAKE_CASE			,							__SCREAMING_SNAKE_CASE							):



	if n == 1:
		return fa
	elif n == 2:
		return fa

	lowercase					  =   fa
	lowercase					  =   fa
	n -= 2

	while n > 0:
		lowercase  , lowercase					  =   fn_a + fn_a, fn_a
		n -= 1

	return fn_a






def 							UpperCAmelCase_		(							):
	lowercase					  =   '\nfrom random import randint\nfrom __main__ import fibonacci_with_matrix_exponentiation\n'
	lowercase					  =   'fibonacci_with_matrix_exponentiation(randint(1,70000), 1, 1)'
	lowercase					  =   timeit.timeit(setup=__SCREAMING_SNAKE_CASE			,							stmt=__SCREAMING_SNAKE_CASE			,							number=100							)
	print('With matrix exponentiation the average execution time is '			,							exec_time / 100							)
	return exec_time






def 							UpperCAmelCase_		(							):
	lowercase					  =   '\nfrom random import randint\nfrom __main__ import simple_fibonacci\n'
	lowercase					  =   'simple_fibonacci(randint(1,70000), 1, 1)'
	lowercase					  =   timeit.timeit(setup=__SCREAMING_SNAKE_CASE			,							stmt=__SCREAMING_SNAKE_CASE			,							number=100							)
	print(
	    'Without matrix exponentiation the average execution time is '			,							exec_time / 100							)
	return exec_time






def 							UpperCAmelCase_		(							):
	matrix_exponentiation_time()
	simple_fibonacci_time()


if __name__ == "__main__":
							main()



def 							UpperCAmelCase_		(							__SCREAMING_SNAKE_CASE							):
	lowercase					  =   [701, 301, 132, 57, 23, 10, 4, 1]
	for gap in gaps:
		for i in range(__SCREAMING_SNAKE_CASE			,							len(__SCREAMING_SNAKE_CASE							)							):
			lowercase					  =   collection[i]
			lowercase					  =   i
			while j >= gap and collection[j - gap] > insert_value:
				lowercase					  =   collection[j - gap]
				j -= gap
			if j != i:
				lowercase					  =   insert_value
	return collection


if __name__ == "__main__":
	from doctest import testmod

	testmod()
	UpperCAmelCase     				=			input('''Enter numbers separated by a comma:\n''').strip()
	UpperCAmelCase     				=			[int(item) for item in user_input.split(''',''')]
	print(shell_sort(unsorted))

