#include #include using namespace std; int main() { int A, B; int num; cin >> A >> B; for (int i = A; i <= B; i++) { if (i % 3 == 0) { cout << i << endl; } else { num = i; while (num > 0) { if (num % 10 == 3) { cout << i << endl; break; } else { num /= 10; } } } } return 0; }