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