#include #include #include #include using namespace std; int main(){ long long a,b,sum=0; cin >> a >> b; for(long long i=a;i<=b;i++){ for(int j=10;j<=1000000000;j*=10){ if(i%j==3){ cout << i << endl; break; } if(i%3==0){ cout << i << endl; break; } } } return 0; }