#include #include #include int main() { int start, end; std::cin >> start >> end; while (start <= end) { if (start % 3 == 0) std::cout << start << std::endl; else { int num = start; while (num != 0) { if (num % 10 == 3) { std::cout << start << std::endl; break; } num /= 10; } } start++; } return 0; }