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