


"""simple docstring"""







from __future__ import annotations

lowerCAmelCase__				    =       []
def  a__      (    SCREAMING_SNAKE_CASE   :   list[list[int]]    ,				SCREAMING_SNAKE_CASE   :   int    ,				SCREAMING_SNAKE_CASE   :   int    ):


		'''simple docstring'''







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


		'''simple docstring'''







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


		'''simple docstring'''







		for i in range(len(SCREAMING_SNAKE_CASE    )    ):
				for j in range(len(SCREAMING_SNAKE_CASE    )    ):
						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))









"""simple docstring"""







def  a__      (    SCREAMING_SNAKE_CASE   :   list[int]    ):


  '''simple docstring'''







  lowerCAmelCase					:					str								=							len(SCREAMING_SNAKE_CASE    )
  for i in range(SCREAMING_SNAKE_CASE    ):
    for j in range(i + 1    ,				SCREAMING_SNAKE_CASE    ):
      if numbers[j] < numbers[i]:
        lowerCAmelCase						,  lowerCAmelCase					:					Any								=							numbers[j], numbers[i]
  return numbers


if __name__ == "__main__":
     lowerCAmelCase__				    =       input('''Enter numbers separated by a comma:\n''').strip()
     lowerCAmelCase__				    =       [int(item) for item in user_input.split(''',''')]
     print(exchange_sort(unsorted))





