using System;
class Program
{
    static void Main()
    {
        int n = Convert.ToInt32(Console.ReadLine());
        HashSet<int> s = new HashSet<int>();
        int max = 2 * n;
        int min = 1;


        for (int i = 0; i < n-2; i++)
        {

            if (s.Contains(min) != true)
            {
                s.Add(min);
                Console.Write($"{min} ");
            }
            if (s.Contains(max) != true)
            {
                s.Add(max);
                Console.Write(max);

            }
            max -= 1;
            min += 1;


            Console.WriteLine();
        }
        Console.WriteLine($"{n} {n + 2}");
        Console.WriteLine($"{n - 1} {n+1}");



    }
}