n=120
while A(n)!=1:
    print(A(n))
    n=A(n)