






def      __A					(     _lowercase					,			_lowercase ):

					'''simple docstring'''







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

					_A								= []
					_A								= list(range(_lowercase ) )

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

					return permutation


if __name__ == "__main__":
				import doctest

				doctest.testmod()











def      __A					(     _lowercase					,			_lowercase					,			_lowercase					,			_lowercase ):

					'''simple docstring'''







					_A							,_A								= len(_lowercase ), len(grid[0] )
					if (
					    min(_lowercase					,			_lowercase ) < 0
					    or row == row_length
					    or col == col_length
					    or (row, col) in visit
					    or grid[row][col] == 1
					):
										return 0
					if row == row_length - 1 and col == col_length - 1:
										return 1

					visit.add((row, col) )

					_A								= 0
					count += depth_first_search(_lowercase					,			row + 1					,			_lowercase					,			_lowercase )
					count += depth_first_search(_lowercase					,			row - 1					,			_lowercase					,			_lowercase )
					count += depth_first_search(_lowercase					,			_lowercase					,			col + 1					,			_lowercase )
					count += depth_first_search(_lowercase					,			_lowercase					,			col - 1					,			_lowercase )

					visit.remove((row, col) )
					return count


if __name__ == "__main__":
				import doctest

				doctest.testmod()



