#include <stdio.h>
#include <limits.h>
void sol(unsigned n) {
unsigned m, s, t, c;
m = n;
c = s = 0;
while ((t = m % 9) == 0) {
if (t) break;
m /= 9;
c++;
}
for (;;) {
s += (m % 9);
m /= 9;
if (m == 0) break;
s *= 10;
}
if (n == 801) printf("c=%d\n", c);
while (c > 0) {
s *= 10;
--c;
}
if (n == s)
printf("%d\n", n); fflush(stdout);
}
int main() {
unsigned i;
for (i =1; i <= UINT_MAX - 1; i++)
sol(i);
}
/* end */