



import operator





def 					__snake_case     (      _UpperCAmelCase       ,			_UpperCAmelCase = False       ,			_UpperCAmelCase = None    ):
    __a							=    operator.lt if reverse else operator.gt
    __a							=    solution or []

    if not arr:
        return solution

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

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

    strand_sort(_UpperCAmelCase       ,			_UpperCAmelCase       ,			_UpperCAmelCase    )
    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]








def 					__snake_case     (      _UpperCAmelCase       ,			_UpperCAmelCase    ):
    return base * power(_UpperCAmelCase       ,			(exponent - 1)    ) if exponent else 1


if __name__ == "__main__":
 print('''Raise base to the power of exponent using recursion...''')
 __snake_case						:List[Any]						=					int(input('''Enter the base: ''').strip())
 __snake_case						:Dict						=					int(input('''Enter the exponent: ''').strip())
 __snake_case						:int						=					power(base, abs(exponent))
 if exponent < 0:  # power() does not properly deal w/ negative exponents
  __snake_case						:Optional[Any]						=					1 / result
 print(f'{base} to the power of {exponent} is {result}')





