from math import log10 total = [1] for i in xrange(2, 10): n = 1 tmp = log10(i) while int(n * tmp) + 1 == n: total.append(i ** n) n += 1 print total