import java.util.Scanner;
public class Main{
public static void main (String[] args) {
Scanner obj = new Scanner(System.in);
int X;
while(true){
X = obj.nextInt();
if(X == 0){
break;
}else{
System.out.print("1");
for(int i = 2; i <= X; i++){
System.out.print(" " + i);
}
System.out.println();
}
}
}
}