Gerald has n younger brothers and their number happens to be even. One day he bought n^2 candy bags. One bag has one candy, one bag has two candies, one bag has three candies and so on. In fact, for each integer k from 1 to n^2 he has exactly one bag with k candies. 

Help him give n bags of candies to each brother so that all brothers got the same number of candies.


-----Input-----

The single line contains a single integer n (n is even, 2 ≤ n ≤ 100) — the number of Gerald's brothers.


-----Output-----

Let's assume that Gerald indexes his brothers with numbers from 1 to n. You need to print n lines, on the i-th line print n integers — the numbers of candies in the bags for the i-th brother. Naturally, all these numbers should be distinct and be within limits from 1 to n^2. You can print the numbers in the lines in any order. 

It is guaranteed that the solution exists at the given limits.


-----Examples-----
Input
2

Output
1 4
2 3



-----Note-----

The sample shows Gerald's actions if he has two brothers. In this case, his bags contain 1, 2, 3 and 4 candies. He can give the bags with 1 and 4 candies to one brother and the bags with 2 and 3 to the other brother.

Difficulty: EASY

Solutions:
n = int(input())
a = [[i, n ** 2 - i + 1] for i in range(1, n ** 2)]
for j in range(0, n ** 2 // 2, n // 2):
	x = a[j:j + n // 2]
	s = []
	for i in range(len(x)):
		s.append(x[i][0])
		s.append(x[i][1])
	print(' '.join(map(str, s)))


x = int(input())
y = x ** 2
i = 0
j = 0
a = 1
number = []
while i < x:
	while j < x / 2:
		number.append(a)
		number.append(y)
		a += 1
		y -= 1
		j += 1
		if j >= x / 2:
			j = 0
			print(' '.join(map(str, number)))
			number = []
			break
	i += 1


n = int(input())
m = n * n
d = m // n
a = 1
b = m
l = []
while a < b:
	l.append(a)
	l.append(b)
	a = a + 1
	b = b - 1
	if len(l) == d:
		print(*l)
		l.clear()


def candy_bags():
	brothers = int(input())
	bags = [i for i in range(1, brothers ** 2 + 1)]
	all_brothers = [[] for i in range(brothers)]
	for i in range(len(all_brothers)):
		for j in range(int(brothers / 2)):
			all_brothers[i].append(bags[0])
			all_brothers[i].append(bags[-1])
			bags.pop()
			bags.pop(0)
		output = str(all_brothers[i][0])
		for x in range(1, len(all_brothers[i])):
			output += ' ' + str(all_brothers[i][x])
		print(output)
candy_bags()


n = int(input())
l = []
for i in range(1, n * n // 2 + 1):
	l.append(i)
	l.append(n * n - i + 1)
for i in range(n):
	print(*l[i * n:(i + 1) * n])


class CodeforcesTask334ASolution:

	def __init__(self):
		self.result = ''
		self.n = 0

	def read_input(self):
		self.n = int(input())

	def process_task(self):
		rr = 1 + self.n ** 2
		for x in range(self.n):
			candies = []
			for y in range(self.n // 2):
				candies.append(self.n // 2 * x + y + 1)
				candies.append(rr - self.n // 2 * x - 1 - y)
			print(' '.join([str(z) for z in candies]))

	def get_result(self):
		return self.result
Solution = CodeforcesTask334ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


n = int(input())
a = int(n ** 2 + 1)
t = 1
for i in range(1, n + 1):
	for j in range(int(n / 2) - 1):
		print('%d %d' % (t, a - t), end=' ')
		t += 1
	print('%d %d' % (t, a - t))
	t += 1


n = int(input().strip())
candyBags = list(range(1, n ** 2 + 1))
while len(candyBags) > 1:
	partial = []
	while len(partial) < n:
		partial.append(candyBags.pop(0))
		partial.append(candyBags.pop())
	print(*partial)


n = int(input())
for i in range(n * n // 2):
	if (i + 1) * 2 % n != 0:
		print(i + 1, n * n - i, end=' ')
	else:
		print(i + 1, n * n - i)


N = int(input())
left = 1
right = N * N
ans = []
for i in range(N):
	temp = []
	for j in range(N // 2):
		temp.append(left)
		left += 1
		temp.append(right)
		right -= 1
	ans.append(temp)
for line in ans:
	print(' '.join(map(str, line)))


n = int(input())
candies = []
for pair in zip(range(1, n * n // 2 + 1), range(n * n, 0, -1)):
	candies.extend(pair)
	if len(candies) == n:
		print(*candies)
		candies.clear()


t = int(input())
a = []
for i in range(1, t * t + 1):
	a.append(i)
c = 0
b = []
for j in range(len(a) // 2):
	b.append(int(a[j]))
	b.append(int(a[len(a) - 1 - j]))
	c = c + 1
	if c == t / 2:
		print(*b)
		c = 0
		b = []


n = int(input())
l = n * n + 1
k = 1
for i in range(n):
	row = []
	for j in range(n // 2):
		row.append(str(k))
		row.append(str(l - k))
		k += 1
	print(' '.join(row))


n = int(input())
x = n ** 2
output = []
current = 0
for i in range(x // 2):
	output.append(i + 1)
	output.append(x - i)
	current += 2
	if current == n:
		print(' '.join((str(i) for i in output)))
		current = 0
		output = []


n = int(input())
m = n // 2
N = n ** 2 + 1
for i in range(n):
	for j in range(i * m + 1, i * m + m + 1):
		print(j, N - j, end='')
		if j == i * m + m:
			print()
		else:
			print(' ', end='')


import math
n = int(input())
candylist = []
for i in range(1, n ** 2 + 1):
	candylist.append(i)
for i in range(n):
	for k in range(n // 2):
		print(candylist[0], end=' ')
		if k != n // 2 - 1:
			print(candylist[len(candylist) - 1], end=' ')
		else:
			print(candylist[len(candylist) - 1])
		candylist.pop(0)
		candylist.pop(len(candylist) - 1)


import sys
from functools import reduce
from collections import Counter
import time
import datetime
from math import sqrt, gcd

def ip():
	return int(sys.stdin.readline())

def sip():
	return sys.stdin.readline()

def mip():
	return map(int, sys.stdin.readline().split())

def mips():
	return map(str, sys.stdin.readline().split())

def lip():
	return list(map(int, sys.stdin.readline().split()))

def matip(n, m):
	lst = []
	for i in range(n):
		arr = lip()
		lst.append(arr)
	return lst

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def minJumps(arr, n):
	jumps = [0 for i in range(n)]
	if n == 0 or arr[0] == 0:
		return float('inf')
	jumps[0] = 0
	for i in range(1, n):
		jumps[i] = float('inf')
		for j in range(i):
			if i <= j + arr[j] and jumps[j] != float('inf'):
				jumps[i] = min(jumps[i], jumps[j] + 1)
				break
	return jumps[n - 1]

def dic(arr):
	return Counter(arr)

def check_prime(n):
	if n < 2:
		return False
	for i in range(2, int(n ** 0.5) + 1, 2):
		if n % i == 0:
			return False
	return True
n = ip()
z = n * n
count = 1
for i in range(n):
	arr = []
	for i in range(n // 2):
		arr.append(count)
		arr.append(z)
		count += 1
		z -= 1
	print(*arr)


n = int(input())
bags = [i for i in range(1, n * n + 1)]
totalCandy = (1 + n * n) * (n * n) / 2
splitCandy = totalCandy / n
bagList = [[] for i in range(n)]
bagNum = 0
for i in range(int(n * n / 2)):
	bagList[bagNum].append(bags[i])
	bagList[bagNum].append(bags[n * n - i - 1])
	if sum(bagList[bagNum]) == splitCandy:
		print(*bagList[bagNum])
		bagNum += 1


def main():
	n = int(input())
	n_2 = n // 2
	nn = n * n
	print('\n'.join((' '.join((' '.join(map(str, [i + j, nn - (i - 1) - j])) for j in range(n_2))) for i in range(1, nn // 2 + 1, n_2))))
main()


numberBrother = int(input())
numberSet = int(numberBrother / 2)
start = 1
end = int(numberBrother ** 2)
count = 0
while count != numberBrother:
	holder = []
	for counter in range(numberSet):
		holder.append(start)
		holder.append(end)
		start += 1
		end -= 1
	count += 1
	print(*holder, sep=' ')


n = int(input())
z = 1
k = pow(n, 2)
p = n
while n != 0:
	c = [0 for i in range(p)]
	for i in range(len(c)):
		if i % 2 == 0:
			c[i] = z
			z += 1
		else:
			c[i] = k
			k -= 1
	print(*c)
	n -= 1


n = int(input())
arr = [i for i in range(1, n ** 2 + 1)]
temp = []
(start, end) = (0, len(arr) - 1)
while start < end:
	temp.append(arr[start])
	temp.append(arr[end])
	if sum(temp) == sum(arr) / n:
		print(' '.join((str(i) for i in temp)))
		temp = []
	start += 1
	end -= 1


n = int(input())
arr = [i for i in range(1, n ** 2 + 1)]
arr1 = []
for i in range(len(arr) // 2):
	arr1.append(str(arr[i]))
	arr1.append(str(arr[0 - (i + 1)]))
s = 0
e = n
while True:
	print(' '.join(arr1[s:e]))
	s = e
	e = s + n
	if e > n ** 2:
		break


n = int(input())
li = [i for i in range(1, n ** 2 + 1)]
j = []
ans = []
count = 0
k = []
for i in range(0, n ** 2 // 2):
	j.append([li[i], li[-i - 1]])
for i in j:
	k += i
	count += 1
	if count == n // 2:
		ans.append(k)
		k = []
		count = 0
for i in ans:
	print(*i)


n = int(input())
ans = []
i = 1
nn = n * n
for _ in range(n):
	s = []
	for _ in range(n // 2):
		s += [str(i)]
		s += [str(nn - i + 1)]
		i += 1
	ans += [' '.join(s)]
print('\n'.join(ans))


n = int(input())
c = 1
d = n ** 2
for i in range(0, n):
	r = []
	for j in range(0, n // 2):
		r.append(c)
		r.append(d)
		c += 1
		d -= 1
	print(*r)


n = int(input())
l = [str(x) + ' ' + str(n ** 2 - x + 1) for x in range(1, n ** 2 // 2 + 1)]
for i in range(0, n ** 2 // 2, n // 2):
	print(' '.join(l[i:i + n // 2]))


n = int(input())
for i in range(n):
	temp = []
	for j in range(i * n // 2, (i + 1) * n // 2):
		temp.append(j + 1)
		temp.append(n ** 2 - j)
	print(' '.join((str(temp[k]) for k in range(n))))


n = int(input().strip())
i = 1
j = n ** 2
while i < j:
	arr = [i, j]
	for x in range(n // 2 - 1):
		i += 1
		j -= 1
		arr.append(i)
		arr.append(j)
	i += 1
	j -= 1
	print(*arr)


n = int(input())
a = [int(x) for x in range(1, n ** 2 + 1)]
b = []
for i in range(0, n ** 2 // 2, n // 2):
	c = []
	for h in range(i, i + n // 2):
		c.append(a[h])
		c.append(a[len(a) - 1 - h])
	b.append(c)
for i in range(len(b)):
	print(' '.join((str(x) for x in b[i])))


w = int(input())
l = []
for x in range(1, int(w ** 2) // 2 + 1):
	l.append(str(x))
	l.append(str(int(w ** 2) + 1 - x))
for x in range(0, int(w ** 2), w):
	a = ' '.join(l[x:x + w])
	print(a)


n = int(input())
i = 1
j = n * n
while j - i + 1 >= n:
	lst = []
	while len(lst) != n:
		lst.append(str(i))
		lst.append(str(j))
		i = i + 1
		j = j - 1
	print(' '.join(lst))


N = int(input())
M = N * N // 2
candies = [[] for i in range(N)]
for i in range(M):
	j = 2 * i // N
	n = M - abs(j - M)
	candies[j].append(i + 1)
	candies[j].append(N * N - i)
for i in range(N):
	print(*candies[i])


import math
from decimal import *
getcontext().prec = 30
n = int(input())
curr = 1
for i in range(n):
	l = list()
	while len(l) < n:
		l.append(curr)
		l.append(n * n + 1 - curr)
		curr += 1
	print(*l)