#include #include #include #include #include #include #include using namespace std; template T gcd(T x, T y) { if (y == 0) return x; return gcd(y, x % y); } template T lcm(T x, T y) { if (x == 0 || y == 0) return 0; return x / gcd(x, y) * y; } int main() { int A, B; cin >> A >> B; auto ans = boost::irange(A, B + 1) | boost::adaptors::filtered([](int i) { return boost::count(to_string(i), '3') > 0; }); for (int i : ans) cout << i << endl; }