
def  A__ (       __lowerCamelCase = 1_00,  __lowerCamelCase = 1_00						):
   return max(
       sum(int(_SCREAMING_SNAKE_CASE						) for x in str(base**power						)						)
       for base in range(_SCREAMING_SNAKE_CASE						)
       for power in range(_SCREAMING_SNAKE_CASE						)						)


# Tests
if __name__ == "__main__":
   import doctest

   doctest.testmod()





import random


def        _UpperCAmelCase							(	_SCREAMING_SNAKE_CASE       :		List[Any]							):





    """simple docstring"""


    def is_sorted(_SCREAMING_SNAKE_CASE       :		List[Any]							):
        for i in range(len(_SCREAMING_SNAKE_CASE							) - 1							):
            if collection[i] > collection[i + 1]:
                return False
        return True

    while not is_sorted(_SCREAMING_SNAKE_CASE							):
        random.shuffle(_SCREAMING_SNAKE_CASE							)
    return collection


if __name__ == "__main__":
       UpperCamelCase__	:   Tuple								=     input("Enter numbers separated by a comma:\n").strip()
       UpperCamelCase__	:   List[str]								=     [int(item) for item in user_input.split(",")]
       print(bogo_sort(unsorted))


