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