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