import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); sc.close(); List a = new ArrayList<>(); int x = 9; int ta = 0; for (int i = 0; i < n; i++) { a.add(x); ta += x; x += 3; } List b = new ArrayList<>(); int y = 7; int tb = 0; for (int i = 0; i < n + 1; i++) { b.add(y); tb += y; y += 3; } StringBuilder sb = new StringBuilder(); for (int i : a) { sb.append(i).append(' '); } sb.deleteCharAt(sb.length() - 1); System.out.println(sb.toString()); int rem = tb - ta; sb = new StringBuilder(); for (int i : b) { if (i != rem) { sb.append(i).append(' '); } } sb.deleteCharAt(sb.length() - 1); System.out.println(sb.toString()); } }