import java.util.*; class Nabeatu{ public Nabeatu(int From,int End){ for(int i=From;i<=End;i++){ if (i%3==0){ System.out.println(i); } else{ String s_From = Integer.toString(i); if(s_From.contains("3")){ System.out.println(s_From); } } } } public Nabeatu(){ System.out.println("3でバカになる"); } } public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int From = sc.nextInt(); int End = sc.nextInt(); Nabeatu bk = new Nabeatu(From,End); } }