import java.util.Scanner; public class Exercises4{ public static void main (String[] args){ Scanner sc = new Scanner(System.in); int firstNum = sc.nextInt(); int secondNum = sc.nextInt(); for(int n = firstNum; n < secondNum; n++){ if (n % 3 == 0 || n % 10 == 3 || n / 10 == 3){ System.out.println(n); } } } }