#include<iostream>
main(){
  int c=0,d=1,n;std::cin>>n;
  while(c<=n)std::cout<<c<<"\n"&&(c+=d)&&c/d/10&&(d*=10);
}