#include int main(void){ int A, B; scanf("%d %d",&A, &B); for(int i=A;i<=B;i++){ if(i%3==0){ printf("%d\n",i); }else if(i%10==3){ printf("%d\n",i); }else if((i/10)%3==0){ printf("%d\n",i); } } }