






"""simple docstring"""

from math import factorial, radians






def _lowerCAmelCase	(  __lowerCamelCase:float ,						__lowerCamelCase:int = 1_8 ,						__lowerCamelCase:int = 1_0   ):

						'''simple docstring'''






						__magic_name__            =     angle_in_degrees - ((angle_in_degrees // 3_6_0.0) * 3_6_0.0)

						# Converting from degrees to radians
						__magic_name__            =     radians(__lowerCamelCase   )

						__magic_name__            =     angle_in_radians
						__magic_name__            =     3
						__magic_name__            =     -1

						for _ in range(__lowerCamelCase   ):
												result += (b * (angle_in_radians**a)) / factorial(__lowerCamelCase   )

												__magic_name__            =     -b  # One positive term and the next will be negative and so on...
												a += 2  # Increased by 2 for every term.

						return round(__lowerCamelCase ,						__lowerCamelCase   )


if __name__ == "__main__":
			__import__('''doctest''').testmod()











"""simple docstring"""

from __future__ import annotations

lowercase    			=       []






def _lowerCAmelCase	(  __lowerCamelCase:list[list[int]] ,						__lowerCamelCase:int ,						__lowerCamelCase:int   ):

						'''simple docstring'''






						for i in range(len(__lowerCamelCase   )   ):
												if board[row][i] == 1:
																		return False
						for i in range(len(__lowerCamelCase   )   ):
												if board[i][column] == 1:
																		return False
						for i, j in zip(range(__lowerCamelCase ,						-1 ,						-1   ) ,						range(__lowerCamelCase ,						-1 ,						-1   )   ):
												if board[i][j] == 1:
																		return False
						for i, j in zip(range(__lowerCamelCase ,						-1 ,						-1   ) ,						range(__lowerCamelCase ,						len(__lowerCamelCase   )   )   ):
												if board[i][j] == 1:
																		return False
						return True






def _lowerCAmelCase	(  __lowerCamelCase:list[list[int]] ,						__lowerCamelCase:int   ):

						'''simple docstring'''






						if row >= len(__lowerCamelCase   ):
												solution.append(__lowerCamelCase   )
												printboard(__lowerCamelCase   )
												print()
												return True
						for i in range(len(__lowerCamelCase   )   ):
												if is_safe(__lowerCamelCase ,						__lowerCamelCase ,						__lowerCamelCase   ):
																		__magic_name__            =     1
																		solve(__lowerCamelCase ,						row + 1   )
																		__magic_name__            =     0
						return False






def _lowerCAmelCase	(  __lowerCamelCase:list[list[int]]   ):

						'''simple docstring'''






						for i in range(len(__lowerCamelCase   )   ):
												for j in range(len(__lowerCamelCase   )   ):
																		if board[i][j] == 1:
																								print("Q" ,						end=" "   )
																		else:
																								print("." ,						end=" "   )
												print()


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


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



