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