#include using namespace std; int main(){ int A, B; cin >> A >> B; for (int i = A; i <= B; i++){ bool ok = false; if (i % 3 == 0){ ok = true; } string S = to_string(i); int L = S.size(); for (int j = 0; j < L; j++){ if (S[j] == '3'){ ok = true; } } if (ok){ cout << i << endl; } } }