def isflowernum(num,n):
result=0
m=num
while m>0:
result+=(m%10)**n
m//=10
return result==num
import sys
if sys.version_info[0]==3 : raw_input=input
n=int(raw_input("please input n:"))
for i in range(10**(n-1),10**n):
if isflowernum(i,n):
print(i)
def isflowernum(num,n):
result=0
m=num
while m>0:
result+=(m%10)**n
m//=10
return result==num
import sys
if sys.version_info[0]==3 : raw_input=input
n=int(raw_input("please input n:"))
for i in range(10**(n-1),10**n):
if isflowernum(i,n):
print(i)