



import json
import sys







def 	lowerCamelCase_   (  _a    :		str					,						_a    :		Any  ):



    '''simple docstring'''




    with open(__SCREAMING_SNAKE_CASE					,						encoding="""utf-8"""  ) as f:
        UpperCAmelCase_			:    Union[str, Any]   						= json.load(__SCREAMING_SNAKE_CASE  )

    UpperCAmelCase_			:    Any   						= ['<details>', '<summary>Show updated benchmarks!</summary>', ' ']

    for benchmark_name in sorted(__SCREAMING_SNAKE_CASE  ):
        UpperCAmelCase_			:    Union[str, Any]   						= results[benchmark_name]

        UpperCAmelCase_			:    Optional[Any]   						= benchmark_name.split("""/"""  )[-1]
        output_md.append(F'''### Benchmark: {benchmark_file_name}'''  )

        UpperCAmelCase_			:    Any   						= '| metric |'
        UpperCAmelCase_			:    List[str]   						= '|--------|'
        UpperCAmelCase_			:    Any   						= '| new / old (diff) |'
        for metric_name in sorted(__SCREAMING_SNAKE_CASE  ):
            UpperCAmelCase_			:    Optional[Any]   						= benchmark_res[metric_name]
            UpperCAmelCase_			:    Any   						= metric_vals['new']
            UpperCAmelCase_			:    List[Any]   						= metric_vals.get("""old"""					,						__SCREAMING_SNAKE_CASE  )
            UpperCAmelCase_			:    Dict   						= metric_vals.get("""diff"""					,						__SCREAMING_SNAKE_CASE  )

            UpperCAmelCase_			:    Dict   						= F''' {new_val:f}''' if isinstance(__SCREAMING_SNAKE_CASE					,						(int, float)  ) else 'None'

            if old_val is not None:
                val_str += F''' / {old_val:f}''' if isinstance(__SCREAMING_SNAKE_CASE					,						(int, float)  ) else "None"
            if dif_val is not None:
                val_str += F''' ({dif_val:f})''' if isinstance(__SCREAMING_SNAKE_CASE					,						(int, float)  ) else "None"

            title += " " + metric_name + " |"
            lines += "---|"
            value += val_str + " |"

        output_md += [title, lines, value, " "]

    output_md.append("""</details>"""  )

    with open(__SCREAMING_SNAKE_CASE					,						"""w"""					,						encoding="""utf-8"""  ) as f:
        f.writelines("""\n""".join(__SCREAMING_SNAKE_CASE  )  )


if __name__ == "__main__":
      UpperCamelCase_										=					sys.argv[1]
      UpperCamelCase_										=					sys.argv[2]

      format_json_to_md(input_json_file, output_md_file)

"""simple docstring"""







from __future__ import annotations

__SCREAMING_SNAKE_CASE    	=[]



def 			lowercase__(       __SCREAMING_SNAKE_CASE							:     list[list[int]]     ,			__SCREAMING_SNAKE_CASE							:     int     ,			__SCREAMING_SNAKE_CASE							:     int      ):
     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 			lowercase__(       __SCREAMING_SNAKE_CASE							:     list[list[int]]     ,			__SCREAMING_SNAKE_CASE							:     int      ):
     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      ):
               lowercase_	:				int													=	1
               solve(__SCREAMING_SNAKE_CASE     ,			row + 1      )
               lowercase_	:				Dict													=	0
     return False



def 			lowercase__(       __SCREAMING_SNAKE_CASE							:     list[list[int]]      ):
     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"))
__SCREAMING_SNAKE_CASE    	=8
__SCREAMING_SNAKE_CASE    	=[[0 for i in range(n)] for j in range(n)]
solve(board, 0)







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

