import java.util.*; import java.io.*; public class Main{ static final Reader sc = new Reader(); static final PrintWriter out = new PrintWriter(System.out,false); public static void main(String[] args) throws Exception { long a = sc.nextLong(); long b = sc.nextLong(); for(long i = a;i<=b;i++){ if(i%3==0){ out.println(i); } else{ String x = String.valueOf(i); for(int j=0;j