int main() { int i, j, k; int r; int kk; scanf("%d%d", &i, &j); for (k = i; k <= j; k++) { if (k % 3 == 0) { printf("%d\n", k); continue; } kk = k; while (k > 1) { r = k % 10; if (r == 3) { printf("%d\n ", kk); break; } k = (int)floor(k / 10); } } return 0; }