#include <stdio.h>
int main()
{
int cube[10] = {0, 1, 8, 27, 64, 125, 216, 343, 512, 729};
int a, b, c;
for(a = 1; a < 10; ++a)
{
for(b = 0; b < 10; ++b)
{
int x = 100*a + 10*b - cube[a] - cube[b];
if(x < 0)
{
break;
}
for(c = 0; c < 10; ++c)
{
if(cube[c] - c == x)
{
printf("%d%d%d\n", a, b, c);
}
}
}
}
return 0;
}