#include #include #include using namespace std; bool func1(int x) { string s = to_string(x); if ( s.find("3") != s.npos ) { stoi(s); return true; } else { return false; } } bool func2(int y) { if( ((y % 3) == 0) || func1(y) ) return true; else return false; } int main() { int a,b; cin >> a >> b; const int c = b - a + 1; for ( int i = 0; i < c; ++i) { if ( func2(a) ) cout << a <