using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static void Main() { var n = NN; var (a, b) = Same(n); WriteLine(string.Join(" ", a)); WriteLine(string.Join(" ", b)); } static (int[] a, int[] b) Same(int n) { var a = new int[n]; var b = new int[n]; for (var i = 0; i < n; ++i) { a[i] = 3 * (i + 1); b[i] = 3 * (i + 1) + 1; } a[n - 1] += 3; var rest = n - 3; if (n % 3 == 2) { a[n - 2] += 10; a[n - 1] += 19; b[n - 2] += 12; b[n - 1] += 15; rest -= 2; } else if (n % 3 == 1) { ++a[n - 1]; --rest; } for (var i = 0; i < n; ++i) { if (rest <= 0) break; b[i] -= 3; rest -= 3; } return (a, b); } }