print max(sum(ord(c)-48 for c in str(a**b)) for a in range(1,100) for b in range(1,100))
600898578cd18f1cb4e7ec26a3e5e7749c395d70
print max(sum(ord(c)-48 for c in str(a**b)) for a in range(1,100) for b in range(1,100))