
import operator

def  __lowerCamelCase					( _lowercase						,     _lowercase = False						,     _lowercase = None			)       ->      list:
     UpperCamelCase						    =					operator.lt if reverse else operator.gt
     UpperCamelCase						    =					solution or []

     if not arr:
          return solution

     UpperCamelCase						    =					[arr.pop(0			)]
     for i, item in enumerate(_lowercase			):
          if _operator(_lowercase						,     sublist[-1]			):
               sublist.append(_lowercase			)
               arr.pop(_lowercase			)

    #  merging sublist into solution list
     if not solution:
          solution.extend(_lowercase			)
     else:
          while sublist:
               UpperCamelCase						    =					sublist.pop(0			)
               for i, xx in enumerate(_lowercase			):
                    if not _operator(_lowercase						,     _lowercase			):
                         solution.insert(_lowercase						,     _lowercase			)
                         break
               else:
                    solution.append(_lowercase			)

     strand_sort(_lowercase						,     _lowercase						,     _lowercase			)
     return solution


if __name__ == "__main__":
 assert strand_sort([4, 3, 5, 1, 2]) == [1, 2, 3, 4, 5]
 assert strand_sort([4, 3, 5, 1, 2], reverse=True) == [5, 4, 3, 2, 1]




from decimal import Decimal, getcontext
from math import ceil, factorial

def  __lowerCamelCase					( _lowercase			)       ->      str:

     if not isinstance(_lowercase						,     _lowercase			):
          raise TypeError('Undefined for non-integers'			)
     elif precision < 1:
          raise ValueError('Undefined for non-natural numbers'			)

     UpperCamelCase						    =					precision
     UpperCamelCase						    =					ceil(precision / 14			)
     UpperCamelCase						    =					426880 * Decimal(10005			).sqrt()
     UpperCamelCase						    =					1
     UpperCamelCase						    =					13591409
     UpperCamelCase						    =					Decimal(_lowercase			)
     for k in range(1						,     _lowercase			):
          UpperCamelCase						    =					factorial(6 * k			) // (factorial(3 * k			) * factorial(_lowercase			) ** 3)
          linear_term += 545140134
          exponential_term *= -262537412640768000
          partial_sum += Decimal(multinomial_term * linear_term			) / exponential_term
     return str(constant_term / partial_sum			)[:-1]


if __name__ == "__main__":
 _snake_case      = 50
 print(F"The first {n} digits of pi is: {pi(n)}")


