#include #include #include using namespace std; int main(void) { int a, b; cin >> a >> b; while (a <= b) { if (a % 3 == 0) { cout << a << endl; } else { string s = to_string(a); if (s.find('3') != std::string::npos) cout << a << endl; } ++a; } return 0; }