package b2015_09_19; import java.util.Scanner; public class No207 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long A = sc.nextLong(); long B= sc.nextLong(); for(; A<=B; A++){ if(A%3==0){ System.out.println(A); continue; } long tmp = A; while(tmp!=0){ if(tmp%10==3){ System.out.println(A); break; } tmp/=10; } } } }