#include using namespace std; int a, b; int main(){ cin >> a >> b; for(int i=a;i<=b;i++){ if(i%3 == 0) cout << i << endl; else{ int p = i; while(p){ if(p%10 == 3){ cout << i << endl; break; } p /= 10; } } } }