#include #include #include #include #include #include #include using namespace std; int main(){ long A, B; cin >> A >> B; for(int i = A; i <= B; i++){ if(i % 3 == 0 || i % 10 == 3 || i / 10 == 3 || (i / 10) %10 == 3 || (i/100)%10==3 || (i/1000)%10==3 || (i/10000)%10==3 || (i/100000)%10==3 || (i/1000000)%10==3 || (i/10000000)%10==3 || (i/100000000)%10==3 || (i/1000000000)%10==3 || (i/10000000000)%10==3 || (i/100000000000)%10==3 ){ cout << i << endl; } } return 0; }