#include using namespace std; int main(){ int a, b; string c; cin >> a >> b; for (int i=a; i<=b; i++){ c = to_string(i); if(i%3 == 0 || c.find("3") != -1) cout << i << endl; } }