#include int main(void) { int s, e; int i, j; char str[10]; scanf("%d%d", &s, &e); for(i = s;i <= e;i++){ if(i % 3 == 0){ printf("%d\n", i); } else{ sprintf(str, "%d", i); j = 0; while(str[j] != '\0'){ if(str[j] == '3'){ printf("%d\n", i); break; } j++; } } } return 0; }