


'''simple docstring'''



from __future__ import annotations




def      _a     (						_lowercase :     list[int | str]  ):





     '''simple docstring'''






     create_state_space_tree(_lowercase      , []      , 0      , [0 for i in range(len(_lowercase  )  )]  )




def      _a     (						_lowercase :     list[int | str]      , _lowercase :     list[int | str]      , _lowercase :     int      , _lowercase :     list[int]      , ):





     '''simple docstring'''






     if index == len(_lowercase  ):
          print(_lowercase  )
          return

     for i in range(len(_lowercase  )  ):
          if not index_used[i]:
               current_sequence.append(sequence[i]  )
               __UpperCAmelCase     :			List[str]  							=      True
               create_state_space_tree(_lowercase      , _lowercase      , index + 1      , _lowercase  )
               current_sequence.pop()
               __UpperCAmelCase     :			int  							=      False
__UpperCAmelCase      :list[int | str]			    =       [3, 1, 2, 4]
generate_all_permutations(sequence)

__UpperCAmelCase      :list[int | str]			    =       ["A", "B", "C"]

generate_all_permutations(sequence_a)



'''simple docstring'''



import requests

__UpperCAmelCase      :Union[str, Any]			    =       "https://newsapi.org/v1/articles?source=bbc-news&sortBy=top&apiKey="




def      _a     (						_lowercase :     str  ):





     '''simple docstring'''






     __UpperCAmelCase     :			Union[str, Any]  							=      requests.get(_NEWS_API + bbc_news_api_key  ).json()
     # each article in the list is a dict
     for i, article in enumerate(bbc_news_page['''articles''']      , 1  ):
          print(F'{i}.) {article["title"]}'  )


if __name__ == "__main__":
      fetch_bbc_news(bbc_news_api_key="<Your BBC News API key goes here>")