o=[k2 for k in range(0,101) if k2<10001]
for i in range(0,10):
a= 10*i for j in range(0,10): b= 100*j c=1000*j x= i+a+b+c if i != j and x in o: print(x)