#include int main() { int i,j,k; scanf("%d%d",&i,&j); int spot; int kk; for(k=i;k<=j;k++){ if(k%3==0){ printf("%d\n",k); continue; } kk=k; while(k>0){ spot=k%10; if(spot==3){ printf("%d\n",kk); break; } k/=10; } } return 0; }