





import random






def     lowerCamelCase__			(__lowerCamelCase,       __lowerCamelCase,       __lowerCamelCase	):
     _SCREAMING_SNAKE_CASE       :	Union[str, Any]						    =							a[left_index]
     _SCREAMING_SNAKE_CASE       :	Union[str, Any]						    =							left_index + 1
     for j in range(left_index + 1,       __lowerCamelCase	):
          if a[j] < pivot:
               _SCREAMING_SNAKE_CASE    ,			_SCREAMING_SNAKE_CASE       :	Any						    =							a[i], a[j]
               i += 1
     _SCREAMING_SNAKE_CASE    ,			_SCREAMING_SNAKE_CASE       :	str						    =							a[i - 1], a[left_index]
     return i - 1






def     lowerCamelCase__			(__lowerCamelCase,       __lowerCamelCase,       __lowerCamelCase	):
     if left < right:
          _SCREAMING_SNAKE_CASE       :	Optional[int]						    =							random.randint(__lowerCamelCase,       right - 1	)
          _SCREAMING_SNAKE_CASE    ,			_SCREAMING_SNAKE_CASE       :	Optional[Any]						    =							(
              a[left],
              a[pivot],
          )  # switches the pivot with the left most bound
          _SCREAMING_SNAKE_CASE       :	List[str]						    =							partition(__lowerCamelCase,       __lowerCamelCase,       __lowerCamelCase	)
          quick_sort_random(
              __lowerCamelCase,       __lowerCamelCase,       __lowerCamelCase	)  # recursive quicksort to the left of the pivot point
          quick_sort_random(
              __lowerCamelCase,       pivot_index + 1,       __lowerCamelCase	)  # recursive quicksort to the right of the pivot point






def     lowerCamelCase__			():
     _SCREAMING_SNAKE_CASE       :	Optional[Any]						    =							input("Enter numbers separated by a comma:\n"	).strip()
     _SCREAMING_SNAKE_CASE       :	Optional[int]						    =							[int(__lowerCamelCase	) for item in user_input.split(","	)]

     quick_sort_random(__lowerCamelCase,       0,       len(__lowerCamelCase	)	)

     print(__lowerCamelCase	)


if __name__ == "__main__":
       main()






from __future__ import annotations

import requests






def     lowerCamelCase__			(__lowerCamelCase	):
     _SCREAMING_SNAKE_CASE       :	Dict						    =							f"""https://hacker-news.firebaseio.com/v0/item/{story_id}.json?print=pretty"""
     return requests.get(__lowerCamelCase	).json()






def     lowerCamelCase__			(__lowerCamelCase = 10	):
     _SCREAMING_SNAKE_CASE       :	List[Any]						    =							"https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty"
     _SCREAMING_SNAKE_CASE       :	Optional[Any]						    =							requests.get(__lowerCamelCase	).json()[:max_stories]
     return [get_hackernews_story(__lowerCamelCase	) for story_id in story_ids]






def     lowerCamelCase__			(__lowerCamelCase = 10	):
     _SCREAMING_SNAKE_CASE       :	List[str]						    =							hackernews_top_stories(__lowerCamelCase	)
     return "\n".join("* [{title}]({url})".format(**__lowerCamelCase	) for story in stories	)


if __name__ == "__main__":
       print(hackernews_top_stories_as_markdown())