#########################################################
#                                                       #
#    Coded by Indranil Ghosh (indranilg49@gmail.com)    #     
#                                                       #
#########################################################

#Python 2.7.11, OEIS sequence: A275725

from sympy import prime, primorial, factorial as f

def a002110(n): return 1 if n<1 else primorial(n)

def a007623(n, p=2): return n if n<p else a007623(int(n/p), p+1)*10 + n%p

def a084558(n): return 0 if n==0 else len(str(a007623(n)))

def a099563(n):
    i=2
    d=0
    while n:
        d=n%i
        n=(n - d)/i
        i+=1
    return d

def a249344(n, k):
    p=prime(n)
    i=z=0
    while p**i<=k:
        if k%(p**i)==0: z=i
        i+=1
    return z

def a257678(n):
    x=str(a007623(n))[1:][::-1]
    return sum([int(x[i])*f(i + 1) for i in xrange(len(x))]) 

def a273673(n, k):
    e=a249344((1 + a084558(k)), n)
    return (n/ prime(1 + a084558(k))**e)*prime(1 + a084558(k) - a099563(k))**e

def a275723(n, k): return n if k==0 else a275723(a273673(n, k), a257678(k))

def a(n): return a275723(a002110(1 + a084558(n)), n)

print [a(n) for n in xrange(100)]