Important Notice for HKOI2003 Finalists

issued by The HKOI Organizing Committee

To help HKOI2003 finalists get familiar with the file input and output requirements of the Final Event, an "open question" is listed below. This question will reappear in HKOI2003 Final Event with slight modifications. Contestants are advised to practise the problem before the competition so as to understand how to read from and write to files in Pascal. Please pay particular attention to the strict requirements in output format in the competition. Output files of ALL HKOI Final questions should comply with the following rules:

Problem 0: Enumeration

Program name : ENUM.EXE
Input file : INPUT.TXT
Output file : OUTPUT.TXT
Execution Time Limit : 1 second

Problem

Write a program to read an integer N and output all integers from 1 to N2.

Input

The input file INPUT.TXT contains a single integer N, 1 <= N <= 10.

Output

The output file OUTPUT.TXT consists of N lines, each containing N integers, separated by a single space. The integers are 1 to N2 in ascending order. An integer is always greater than the one on its left and all numbers in the row above, if applicable.

Sample Input

4

Sample Output

1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16

Solution

A solution is available at http://www.hkoi.com/. You are advised to visit this web page and observe the required output format.