#include<iostream.h>
int main()
{
int x,a,b,c;
for(x=100;x<1000;x++)
a=x/100;
b=(x%100)/10;
c=x%10;
if(x==a*a*a+b*b*b+c*c*c)
cout<<x<<" ";
}
return 0;