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