#include using namespace std; int main() { long a,b; cin >> a >> b; for(long i = a; i < b; i++){ if(i/10 == 3 || i%10 == 3 || i%3 == 0){ cout << i << "\n"; } } return 0; }