



from ...configuration_utils import PretrainedConfig
from ...utils import logging


__snake_case		:Tuple   	=  logging.get_logger(__name__)

class 					_A (			__UpperCAmelCase					):
       UpperCamelCase__						:					Optional[int]		      =		'''timm_backbone'''



       def __init__(	self							:  Any  ,	__SCREAMING_SNAKE_CASE							:  List[Any]=None  ,	__SCREAMING_SNAKE_CASE							:  str=3  ,	__SCREAMING_SNAKE_CASE							:  str=True  ,	__SCREAMING_SNAKE_CASE							:  str=True  ,	__SCREAMING_SNAKE_CASE							:  Union[str, Any]=None  ,	**__SCREAMING_SNAKE_CASE							:  Optional[Any]  ,	):


           '''simple docstring'''

           super().__init__(**UpperCAmelCase__)
           __a		 =       backbone
           __a		 =       num_channels
           __a		 =       features_only
           __a		 =       use_pretrained_backbone
           __a		 =       True
           __a		 =       out_indices if out_indices is not None else (-1,)










from __future__ import annotations

__snake_case		:Optional[Any]   	=  []





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





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





def   __snake_case			(    _UpperCAmelCase       ):
    for i in range(len(_UpperCAmelCase       )       ):
        for j in range(len(_UpperCAmelCase       )       ):
            if board[i][j] == 1:
                print('''Q'''     ,				end=''' '''       )
            else:
                print('''.'''     ,				end=''' '''       )
        print()


# n=int(input("The no. of queens"))
__snake_case		:Optional[Any]   	=  8
__snake_case		:Tuple   	=  [[0 for i in range(n)] for j in range(n)]
solve(board, 0)
print('''The total no. of solutions are :''', len(solution))





