#include void search(int x){ int tmp=x; while(tmp>0){ if((tmp%10)==3){ printf("%d\n",x); break; } tmp/=10; } } int main(int argc, char * argv[]){ int a,b,d,tmp,i; scanf("%d %d",&a,&b); d=b-a; for(i=0;i<=d;i++){ tmp=a+i; if((tmp/3)==0){ printf("%d\n",tmp); }else{ search(tmp); } } return 0; }