





'''simple docstring'''






def      __A						(							a_						:  list	):
		for i in range(len(a_	) - 1      ,0      ,-1	):
				lowerCAmelCase     :    List[str]						=   False

				for j in range(a_      ,0      ,-1	):
						if unsorted[j] < unsorted[j - 1]:
								lowerCAmelCase	,		lowerCAmelCase     :    int						=   unsorted[j - 1], unsorted[j]
								lowerCAmelCase     :    Dict						=   True

				for j in range(a_	):
						if unsorted[j] > unsorted[j + 1]:
								lowerCAmelCase	,		lowerCAmelCase     :    str						=   unsorted[j + 1], unsorted[j]
								lowerCAmelCase     :    List[Any]						=   True

				if not swapped:
						break
		return unsorted


if __name__ == "__main__":
					import doctest

					doctest.testmod()
					lowerCAmelCase       		=      input("""Enter numbers separated by a comma:\n""").strip()
					lowerCAmelCase       		=      [int(item) for item in user_input.split(""",""")]
					print(F'''{cocktail_shaker_sort(unsorted) = }''')










'''simple docstring'''






from __future__ import annotations

lowerCAmelCase       		=      []






def      __A						(							a_						:  list[list[int]]      ,a_						:  int      ,a_						:  int	):
		for i in range(len(a_	)	):
				if board[row][i] == 1:
						return False
		for i in range(len(a_	)	):
				if board[i][column] == 1:
						return False
		for i, j in zip(range(a_      ,-1      ,-1	)      ,range(a_      ,-1      ,-1	)	):
				if board[i][j] == 1:
						return False
		for i, j in zip(range(a_      ,-1      ,-1	)      ,range(a_      ,len(a_	)	)	):
				if board[i][j] == 1:
						return False
		return True






def      __A						(							a_						:  list[list[int]]      ,a_						:  int	):
		if row >= len(a_	):
				solution.append(a_	)
				printboard(a_	)
				print()
				return True
		for i in range(len(a_	)	):
				if is_safe(a_      ,a_      ,a_	):
						lowerCAmelCase     :    Any						=   1
						solve(a_      ,row + 1	)
						lowerCAmelCase     :    List[Any]						=   0
		return False






def      __A						(							a_						:  list[list[int]]	):
		for i in range(len(a_	)	):
				for j in range(len(a_	)	):
						if board[i][j] == 1:
								print("Q"      ,end=" "	)
						else:
								print("."      ,end=" "	)
				print()


# n=int(input("The no. of queens"))
lowerCAmelCase       		=      8
lowerCAmelCase       		=      [[0 for i in range(n)] for j in range(n)]
solve(board, 0)

print("""The total no. of solutions are :""", len(solution))



