



from __future__ import annotations

__snake_case       :	Optional[int]            =[]






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_):
												lowerCAmelCase__  :       int				=  1
												solve(lowerCamelCase_ ,row + 1)
												lowerCAmelCase__  :       Any				=  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"))
__snake_case       :	Any            =8
__snake_case       :	Union[str, Any]            =[[0 for i in range(n)] for j in range(n)]
solve(board, 0)

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






def 			lowerCAmelCase__	(					lowerCamelCase_	:	int):





				'''simple docstring'''

				if length <= 0 or not isinstance(lowerCamelCase_ ,lowerCamelCase_):
								raise ValueError('''Length must be a positive integer.''')
				return [n * (2 * n - 1) for n in range(lowerCamelCase_)]


if __name__ == "__main__":
							print(hexagonal_numbers(length=5))
							print(hexagonal_numbers(length=1_0))

