#include #include using namespace std; int main() { int x, y; string s; cin >> x >> y; for (;x <= y; x++) { s = to_string(x); if (x % 3 == 0) { cout << x << endl; continue; } else if (s.find("3") != string::npos) { cout << x << endl; continue; } } return 0; }