#include int main(){ int a,b,I; scanf("%d %d",&a,&b); for(I=a;I<=b;I++){ if(I%3==0||I%10==3||I%100==3||I%1000==3||I%10000==3||I%100000==3||I%1000000==3||I%10000000==3||I%100000000==3||I%1000000000==3||I%10000000000==3){ printf("%d\n",I); } } return 0; }