
"""simple docstring"""
from __future__ import annotations

from typing import Any






class   _UpperCAmelCase					:
    def __init__(     self    ,     snake_case_    ,     snake_case_  ):  # noqa: A002
      _snake_case  :    List[str]            = item
      _snake_case  :    List[str]            = next






class   _UpperCAmelCase					:
    def __init__(     self  ):
      _snake_case  :    Node | None            = None
      _snake_case  :    int            = 0
    def        lowerCamelCase__						(     self    ,     snake_case_  ):
      _snake_case  :    Union[str, Any]            = Node(snake_case_    ,     self.head  )
      self.size += 1
    def        lowerCamelCase__						(     self  ):
      # Switched 'self.is_empty()' to 'self.head is None'
      # because mypy was considering the possibility that 'self.head'
      # can be None in below else part and giving error
      if self.head is None:
        return None
      else:
        _snake_case  :    int            = self.head.item
        _snake_case  :    int            = self.head.next
        self.size -= 1
        return item
    def        lowerCamelCase__						(     self  ):
      return self.head is None
    def __str__(     self  ):
      if self.is_empty():
        return ""
      else:
        _snake_case  :    List[Any]            = self.head
        _snake_case  :    Any            = ""
        _snake_case  :    list[str]            = []
        while iterate:
          item_list.append(str(iterate.item  )  )
          _snake_case  :    List[Any]            = iterate.next

        _snake_case  :    List[str]            = " --> ".join(snake_case_  )

        return item_str


    def __len__(     self  ):
      return self.size


"""simple docstring"""




def 	UpperCAmelCase       (						UpperCamelCase__ = 100							,     UpperCamelCase__ = 100					):






							"""simple docstring"""





							return max(
							    sum(int(UpperCamelCase__					) for x in str(base**power					)					)
							    for base in range(UpperCamelCase__					)
							    for power in range(UpperCamelCase__					)					)


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

				doctest.testmod()





