import java.util.Scanner; public class No_207 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int x = a/3; int y = b/3; if (a%3==0){ for(int k=x; k<=y; k++){ System.out.println(3*k); } }else{ for(int l=x+1; l<=y; l++){ System.out.println(3*l); } } } }