#include #include int main(void) { int a, b; scanf("%d %d", &a, &b); char str[10]; for(; a<=b; a++) { sprintf(str,"%d",a); if(a % 3 == 0) printf("%d\n", a); else if(strstr(str,"3") != NULL) printf("%d\n", a); } return 0; }