import java.util.ArrayList;
public class makeL
{
	static genericLists <Integer> L = new genericLists <Integer>();
	
	static ArrayList  <Integer> makeL (int n)
	{
		if (n==0) return L.cons(0,L.nil());
		else return L.append(makeL(n-1), L.cons(n,L.nil()));
	}

	public static void main(String [] args)
	{
		System.out.println(makeL(Integer.parseInt(args[0])));
	
	}

}

