#include #include int main(void) { long int a,b; scanf("%ld %ld",&a,&b); long int n=b-a+1; for(long int i=a;i<=b;i++) { if(i%3==0) printf("%ld\n",i); char str[10]; snprintf(str,10,"%d",i); for(int j=0;j<10;j++){ if(str[j]=='3') printf("%ld\n",i); } } return 0; }