#include using namespace std; int main() { unsigned int a, b, c, d; cin >> a >> b; for (int i=a; i<=b;i++){ d = 0; if (i%3==0) c=1; for(d=i; d; d/=10) if(d%10==3) c=1; if (c==1) cout << i << endl; } return 0; }