#include #include #include #include #include #include #include #include #include #define rep(i,n) for(int i=0;i P; const int dx[4] = {0,1,0,-1}; const int dy[4] = {1,0,-1,0}; template inline bool chmax(T &a,T& b){if(a < b){a = b; return true;} else return false;} template inline bool chmin(T &a,T& b){if(a > b){a = b; return true;} else return false;} //struct area //function area //main area int main(){ int a, b; cin >> a >> b; for(int i = a; i<=b; i++){ bool check = false; if(i%3==0) check = true; int k = i; while(k != 0){ if(k%10 == 3){ check = true; break; } k /= 10; } if(check) cout << i << endl; } } /* */