<reponame>csie-asia-Java-Programming-1/week09-20161128-yayun0215
package hw;
import java.util.Scanner;
/*
 * Topic: 輸入一個正整數 N，列舉如下數列，直到數字超過 N 為止。
數列一:1 2 4 7 11 16 22 29…
數列二:1 2 2 3 3 3 4 4 4 4 5 5 5 5 5...
 * Date: 2016/11/28
 * Author: 105021062 鄭雅韵
 */
public class hw02 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn=new Scanner(System.in);
		int n=scn.nextInt();
		int sum=1;
		for (int i=0;i<=n;i++) {
			sum=sum+i;
			if (sum<n) {
				System.out.print(sum+" ");
			}
		}
		System.out.println();
		for (int i=1;i<=n;i++) {
			for (int j=1;j<=i;j++) {
				System.out.print(i+" ");

	}

}
	}
}
