
'''simple docstring'''

def 					A       ( UpperCamelCase_   :       int = 1_00  ,		UpperCamelCase_   :       int = 1_00 )   ->    int:







			'''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()







'''simple docstring'''

def 					A       ( )   ->    str:







			'''simple docstring'''



			lowerCAmelCase__									=							1

			while True:
						if (
						    sorted(str(UpperCamelCase_ ) )
						    == sorted(str(2 * i ) )
						    == sorted(str(3 * i ) )
						    == sorted(str(4 * i ) )
						    == sorted(str(5 * i ) )
						    == sorted(str(6 * i ) )
						):
									return i

						i += 1


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





