import java.util.*; import java.io.*; class test { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int ct = 1, dr = 0, max = Integer.parseInt(in.readLine()); for(int i = 1; i <= max; i++) { dr++; System.out.print(i); if(dr == ct) { dr = 0; ct++; System.out.println(); } else { System.out.print(" "); } } } }