#include #include int main(){ int a, b; std::cin >> a >> b; for (int i = a; i <= b; ++i){ std::string s = std::to_string(i); bool f = false; for (int j = 0; j < s.size(); ++j){ if (s[j] == '3')f = true; } if (f || i % 3 == 0)std::cout << i << std::endl; } return 0; }