#include int main() { unsigned long A, B; std::cin >> A; std::cin >> B; int num; for (unsigned long i = A; i <= B; i++) { if (i % 3 == 0) { std::cout << i << std::endl; continue; } num = i; for (int j = 0; j < 10; j++) { num = (num / 10) % 10; if (num == 3) { std::cout << num << std::endl; break; } } } return 0; }