import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); List list = new ArrayList<>(); for(int i = 0 ; i <= a ; i++) { for(int j = 0 ; j <= b ; j++) { if(a == 0 && b == 0) continue; if(!list.contains(a + b)) { list.add(a + b); } } } Collections.sort(list); for(int i : list) { System.out.println(i); } } }