a=[] for i in range(3e3): a+=sum(map(int,`i`),i), if~-(i in a):print i