import java.util.Scanner; public class No00000207_Main2 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); for(int i = a; i <= b; i++) { if(i % 3 == 0 || String.valueOf(i).contains("3")) { System.out.println(i); } } scan. close(); } }