Little Chris is bored during his physics lessons (too easy), so he has built a toy box to keep himself occupied. The box is special, since it has the ability to change gravity.

There are n columns of toy cubes in the box arranged in a line. The i-th column contains a_{i} cubes. At first, the gravity in the box is pulling the cubes downwards. When Chris switches the gravity, it begins to pull all the cubes to the right side of the box. The figure shows the initial and final configurations of the cubes in the box: the cubes that have changed their position are highlighted with orange. [Image] 

Given the initial configuration of the toy cubes in the box, find the amounts of cubes in each of the n columns after the gravity switch!


-----Input-----

The first line of input contains an integer n (1 ≤ n ≤ 100), the number of the columns in the box. The next line contains n space-separated integer numbers. The i-th number a_{i} (1 ≤ a_{i} ≤ 100) denotes the number of cubes in the i-th column.


-----Output-----

Output n integer numbers separated by spaces, where the i-th number is the amount of cubes in the i-th column after the gravity switch.


-----Examples-----
Input
4
3 2 1 2

Output
1 2 2 3 

Input
3
2 3 8

Output
2 3 8 



-----Note-----

The first example case is shown on the figure. The top cube of the first column falls to the top of the last column; the top cube of the second column falls to the top of the third column; the middle cube of the first column falls to the top of the second column.

In the second example case the gravity switch does not change the heights of the columns.

Difficulty: EASY
Tags: Sorting

Implementation

Greedy algorithms
Skill types: Sorting

Greedy algorithms

Starter code:

Solutions:
import sys

def solver(a):
	b = sorted(a)
	return b

def main():
	lines = sys.stdin.readlines()
	newlines = solver(map(int, lines[1].split()))
	for x in newlines:
		print(x, end=' ')
main()


def gravity_flip(arr):
	return sorted(arr)
cnt = int(input())
arr = list(map(int, input().rstrip().split()))
res = gravity_flip(arr)
for i in res:
	print(i)


n = input()
print(' '.join(map(str, sorted(map(int, input().split())))))


n = int(input())
ans = list(map(int, input().split()))
ans.sort()
for i in ans:
	print(i, end=' ')


input()
lista = input().split(' ')
lista2 = list(lista)
lista2 = [int(x) for x in lista2]

def bubbleSort(alist):
	for passnum in range(len(alist) - 1, 0, -1):
		for i in range(passnum):
			if alist[i] > alist[i + 1]:
				temp = alist[i]
				alist[i] = alist[i + 1]
				alist[i + 1] = temp
bubbleSort(lista2)
string = ''
for i in lista2:
	string = string + str(i) + ' '
print(string)


n = int(input())
a = list(map(int, input().split()))
count = [0] * 101
for i in a:
	count[i] += 1
for i in range(len(count)):
	if count[i] > 0:
		print((str(i) + ' ') * count[i], end='')


n = int(input())
lis = [int(x) for x in input().split()]
lis1 = sorted(lis, reverse=False)
lisstr = [str(x) for x in lis1]
delim = ' '
str1 = delim.join(lisstr)
print(str1)


n = int(input())
l = [int(k) for k in input().split()]
l.sort()
s = ''
for i in l:
	s += str(i) + ' '
print(s)


x = int(input())
s = input().split()
s = list(map(int, s))
s.sort()
s = list(map(str, s))
print(' '.join(s))


n = int(input())
groups = [int(a) for a in input().split(' ')]
print(' '.join([str(x) for x in sorted(groups)]))


a = int(input())
string = input()
p = string.split(' ')
s = [0] * a
for i in range(a):
	s[i] = int(p[i])
k = ''
s.sort()
for i in range(a):
	k += str(s[i])
	k += ' '
print(k)


n = int(input())
nc = list(map(int, input().split()))
nc.sort()
for i in range(0, n):
	print(nc[i])


n = int(input())
array = [int(i) for i in input().split()]
array.sort()
print(*array)
exit()


import sys
n = int(sys.stdin.readline())
arr = [int(c) for c in sys.stdin.readline().split()]
arr.sort()
arr = [str(i) for i in arr]
print(' '.join(arr))


t = int(input())
lst = list(map(int, input().split()))
lst.sort()
print(*lst)


n = input()
s = sorted(map(int, input().split()))
s = list(map(str, s))
print(' '.join(s))


n = int(input())
l = list(map(int, input().split()))
l.sort()
for i in range(0, n):
	print(l[i], end=' ')


n = int(input())
x = [int(i) for i in input().split()]
x.sort()
print(' '.join([str(i) for i in x]))


input()
l = [int(i) for i in input().split()]
l.sort()
a = ' '.join((str(i) for i in l))
print(a)


import sys
input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))
print(' '.join(map(str, sorted(a))))


a = int(input())
b = [int(i) for i in input().split()]
b.sort()
print(*b, sep=' ')


def main():
	input()
	s = input()
	a = (int(v) for v in s.split())
	b = sorted(a)
	c = (str(v) for v in b)
	d = ' '.join(c)
	print(d)
main()


n = int(input())
lis = []
[lis.append(int(i)) for i in input().split()]
lis.sort()
str1 = ''
for i in lis:
	str1 = str1 + ' ' + str(i)
print(str1)


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
import collections

def main():
	n = int(input())
	stack = [int(x) for x in input().split(' ')]
	stack.sort()
	stack = [str(x) for x in stack]
	print(' '.join(stack))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


n = int(input())
l = list(map(int, input().split()))
l.sort()
for x in l:
	print(x, end=' ')


n = int(input())
l = list(map(int, input().split()))
l = sorted(l)
print(' '.join((str(i) for i in l)))


n = int(input())
p = [int(x) for x in input().split()]
p = sorted(p)
for i in range(0, n):
	print(p[i], end=' ')


n = int(input())
numbers = [int(i) for i in input().split()]
numbers = sorted(numbers)
output = [str(k) for k in numbers]
print(' '.join(output))


n = int(input())
l = [int(x) for x in input().split()]
l.sort()
for i in l:
	print(i, end=' ')


n = int(input())
N = [int(x) for x in input().split()]
print(*sorted(N))


n = map(int, input())
arr = list(map(int, input().split()))
arr.sort()
for i in range(len(arr)):
	print(arr[i], end=' ')


import sys
input = sys.stdin.readline
n = int(input())
limbak = [int(x) for x in input().split()]
limbak.sort()
for i in range(0, n):
	print(limbak[i], end=' ')


n = int(input())
mx = 0
m = [int(i) for i in input().split(' ')]
for i in m:
	mx = mx if mx > i else i
f = []
for i in range(mx):
	f.append([0 for _ in range(n)])
	for j in range(n):
		if mx - i - m[j] < 1:
			f[i][j] = 1
		else:
			f[i][j] = 0
for i in range(len(f)):
	f[i] = sorted(f[i])
r = []
for i in range(n):
	a = 0
	for j in range(mx):
		a += f[j][i]
	r.append(a)
print(' '.join([str(i) for i in r]))


number_of_col = int(input())
number_of_boxes = list()
new_list = list()
x = list(map(int, input().split()))
number_of_boxes.append(x)
i = 0
while i < 1:
	j = 0
	while j < number_of_col:
		new_list.append(number_of_boxes[i][j])
		j += 1
	i += 1
new_list = sorted(new_list)
print(*new_list)


arrSize = input()
listNum = input()
arrayNum = [int(x) for x in listNum.split()]
arrayNum.sort()
print(' '.join((repr(e) for e in arrayNum)))


n = int(input())
lst = [int(j) for j in input().split()]
lst.sort()
newlist = [str(i) for i in lst]
print(' '.join(newlist))


a = int(input())
c = input()
b = c.split()
b = [int(c) for c in b]
b.sort()
d = ''
for i in b:
	d += str(i) + ' '
d = d.rstrip()
print(d)


int(input())
ans = [x for x in sorted(map(int, input().split()))]
for x in ans:
	print(x, end=' ')


inp = input()
arr = list(map(int, input().strip().split()))
s = sorted(arr)
print(' '.join(map(str, s)))


def handleInput():
	n = input()
	columns = input()
	columns = columns.split(' ')
	for i in range(len(columns)):
		columns[i] = int(columns[i])
	return [n, columns]

def mergeSort(arr):
	if len(arr) > 1:
		mid = len(arr) // 2
		L = arr[:mid]
		R = arr[mid:]
		mergeSort(L)
		mergeSort(R)
		i = j = k = 0
		while i < len(L) and j < len(R):
			if L[i] < R[j]:
				arr[k] = L[i]
				i += 1
			else:
				arr[k] = R[j]
				j += 1
			k += 1
		while i < len(L):
			arr[k] = L[i]
			i += 1
			k += 1
		while j < len(R):
			arr[k] = R[j]
			j += 1
			k += 1

def output(col):
	for el in col:
		print(str(el) + ' ', end='')
inp = handleInput()
col = inp[1]
mergeSort(col)
output(col)


N = int(input())
X = [int(i) for i in input().split(' ')]
a = max(X)
A = [0] * a
i = 0
while i < N:
	n = 0
	while n < X[i]:
		A[n] += 1
		n = n + 1
	i = i + 1
B = [0] * max(A)
i = 0
while i < a:
	n = 0
	while n < A[i]:
		B[n] += 1
		n = n + 1
	i = i + 1
B.reverse()
i = 0
while i < len(B):
	print(B[i], end=' ')
	i = i + 1


n = int(input())
a = list(map(int, input().split()))
for i in range(n):
	for j in range(i + 1):
		if a[j] > a[i]:
			temp = a[j]
			a[j] = a[i]
			a[i] = temp
		else:
			continue
for k in range(n):
	print(a[k], end=' ')


n = int(input())
arr = list(map(int, input().strip().split(' ')))
arr = sorted(arr)
for i in range(n):
	print(arr[i], end=' ')
print()


n = int(input())
A = [int(i) for i in input().split()]
A.sort()
for i in range(len(A) - 1):
	print(A[i], end=' ')
print(A[len(A) - 1])


n = int(input())
li = list(map(int, input().split(' ')))
li = sorted(li)
li = list(map(str, li))
print(' '.join(li))


n = int(input())
a = input().split()
l = []
for i in a:
	l.append(int(i))
for x in range(0, n):
	for i in range(0, n - 1):
		if l[i] > l[i + 1]:
			z = l[i] - l[i + 1]
			l[i] -= z
			l[i + 1] += z
for y in l:
	print(y, end=' ')


garbage = int(input())
l1 = list(map(int, input().rstrip().split(' ')))
l1.sort()
for i in l1:
	print(i, end=' ')


n = int(input())
ls = list(map(int, input().split()))
ls.sort()
for i in ls:
	print(i, sep=' ', end=' ')


n = int(input())
a = input().split()
for (i, o) in enumerate(a):
	a[i] = int(o)
a.sort()
for (i, o) in enumerate(a):
	a[i] = str(o)
print(' '.join(a))


input()
print(' '.join(map(str, sorted(list(map(int, input().split()))))))


n = int(input())
d = list(map(int, input().split()))
m = max(d)
a = [0] * m
for i in d:
	a[i - 1] += 1
for i in range(len(a)):
	print((str(i + 1) + ' ') * a[i], end='')


def Gravity():
	FirstInput = int(input())
	SecondInput = input()
	SecondInput = [int(s) for s in SecondInput.split(' ')]
	array = SecondInput
	Difference = 0
	if FirstInput == 0:
		return 1
	elif FirstInput == 1:
		print(SecondInput[0])
		return 1
	else:
		SecondInput.sort()
		maxi = max(SecondInput)
		for x in range(FirstInput - 1):
			if x == FirstInput - 2:
				if SecondInput[x] > SecondInput[x + 1]:
					Difference = SecondInput[x] - SecondInput[x + 1]
					SecondInput[x] = SecondInput[x] - Difference
					SecondInput[x + 1] = SecondInput[x + 1] + Difference
					Difference = 0
			elif SecondInput[x] > SecondInput[x + 1]:
				if x == 0 and maxi == SecondInput[x]:
					SecondInput[x + 1] = maxi
					SecondInput[x] = 1
				else:
					SecondInput[x] = SecondInput[x] - SecondInput[x + 1]
					SecondInput[x + 1] = SecondInput[x + 1] + SecondInput[x]
			if x > 0 and SecondInput[x] < SecondInput[x - 1]:
				SecondInput[x - 1] = SecondInput[x - 1] - SecondInput[x]
				SecondInput[x] = SecondInput[x] + SecondInput[x - 1]
	return SecondInput
out = Gravity()
if out != 1:
	print('%s' % ' '.join(map(str, out)))


n = int(input())
cubes = list(map(int, input().split(' ')))
for i in range(n):
	c = 0
	while c < n - 1:
		if cubes[c] > cubes[c + 1]:
			diff = cubes[c] - cubes[c + 1]
			cubes[c] -= diff
			cubes[c + 1] += diff
		c += 1
print(*cubes)


ncubes = int(input())
inp = sorted(list(map(int, input().split(' '))))
for i in inp:
	print(i, end=' ')


T = int(input())
L = list(map(int, input().split()))
L.sort()
S = ''
for I in range(T):
	S += str(L[I]) + ' '
print(S)


n = int(input())
A = sorted([int(x) for x in input().split()])
for i in range(len(A)):
	print(A[i], end=' ')


n = int(input())
list1 = [int(x) for x in input().split()]
d = sorted(list1)
for i in range(0, n):
	print(d[i], end=' ')


n = int(input())
a = list(map(int, input().split()))
for i in sorted(a):
	print(i, end=' ')


n = int(input())
a = list(map(int, input().split()))
i = len(a) - 1
while i > 0:
	if max(a[:i]) > a[i]:
		diff = max(a[:i]) - a[i]
		a[a.index(max(a[:i]))] -= diff
		a[i] += diff
	i -= 1
print(*a)


def func(n):
	x = list(map(int, input().split()))
	print(' '.join(map(str, sorted(x))))
n = int(input())
func(n)


clm = int(input())
numbers = list(map(int, input().split()))
numbers = sorted(numbers)
numbers = str(numbers).strip('[]')
numbers = numbers.replace(',', '')
print(numbers)


n = input()
x = list(map(int, input().split()))
x.sort()
print(*x)


n = input()
data = [int(i) for i in input().split()]
data.sort()
out = str(data).strip('[').rstrip(']').replace(',', ' ')
print(out)


import sys
data = sys.stdin.readlines()
arr = [line.split() for line in data]
boxes = [int(i) for i in arr[1]]
boxes.sort()
string = ''
for b in boxes:
	string = string + str(b) + ' '
string.strip()
print(string)


nos = int(input())
arr = sorted([int(x) for x in input().split()])
print(' '.join(map(str, arr)))


def main():
	input()
	box = [int(_) for _ in input().split()]
	box.sort()
	print(' '.join([str(_) for _ in box]))
main()


import sys
first = sys.stdin.readline()
second = sys.stdin.readline()
second = second.strip('\n')
second = second.split()
myList = [int(i) for i in second]
myList = sorted(myList)
for num in myList:
	print(str(num) + ' ')


n = int(input())
a = list(map(int, input().split()))
for i in range(n - 2, -1, -1):
	for j in range(n - 1, i, -1):
		if a[i] > a[j]:
			(a[i], a[j]) = (a[j], a[i])
for i in a:
	print(i, end=' ')


x = input()
b = list(map(int, input().split()))
b.sort()
for i in b:
	print(i, end=' ')


n = int(input())
box = input().split()
for i in range(0, n):
	box[i] = int(box[i])
box.sort()
for i in range(0, n):
	print(box[i], end=' ')


n = int(input())
a = sorted([int(x) for x in input().split()])
for i in range(n):
	print(a[i], end=' ')


def main():
	int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	print(*a)
main()


num_col = int(input())
cubos = list(map(int, input().split()))
cubos.sort()
for i in range(0, len(cubos) - 1):
	print(cubos[i], end=' ')
print(cubos[-1])


input()
print(' '.join(map(str, sorted([int(x) for x in input().split()]))))


N = int(input())
Cajas = input()
Cajas = Cajas.split()
A = []
for K in range(N):
	X = int(Cajas[K])
	A = A + [X]
A.sort()
Cad = ''
J = 0
while J < N - 1:
	Cad = Cad + str(A[J]) + ' '
	J = J + 1
print(Cad + str(A[J]))


numCol = int(input())
aList = input().split(' ')
for i in range(numCol):
	aList[i] = int(aList[i])
aList.sort()
for i in range(numCol):
	aList[i] = str(aList[i])
print(' '.join(aList))


n = int(input())
a = [int(x) for x in input().split()]
output = ''
a.sort()
for i in range(n):
	output += str(a[i]) + ' '
print(output)


n = int(input())
a = sorted([int(w) for w in input().split()])
for w in a:
	print(w, end=' ')


numCols = input()
list = []
for s in input().split(' '):
	list.append(int(s))
list.sort()
for num in list:
	print(num, end=' ')
print()


n = int(input())
s = input().split()
for i in range(n):
	for j in range(i, n):
		if int(s[i]) > int(s[j]):
			(s[i], s[j]) = (s[j], s[i])
for i in s:
	print(i, end=' ')


d = input()
s = ''
g = sorted(map(int, input().split(' ')))
for i in g:
	d = str(i)
	s += d + ' '
print(s)


n = int(input())
a = list(input().split())
for i in range(len(a)):
	a[i] = int(a[i])
a.sort()
for i in a:
	print(i, end=' ')


input()
li = [int(i) for i in input().split()]
li.sort()
print(*li)


n = int(input())
h = [int(x) for x in input().split()]
h.sort()
for i in range(0, len(h)):
	print(h[i], end=' ')


a = int(input())
x = list(map(int, input().split()))
x = sorted(x)
print(' '.join(map(str, x)))


n = int(input())
l1 = [int(x) for x in input().split()]
l1.sort()
l2 = [str(x) for x in l1]
print(' '.join(l2))


def bubbleSort(arr):
	n = len(arr)
	for i in range(n):
		for j in range(0, n - i - 1):
			if arr[j] > arr[j + 1]:
				(arr[j], arr[j + 1]) = (arr[j + 1], arr[j])
n = int(input())
values = [int(x) for x in input().split()]
bubbleSort(values)
s = ''
for i in range(len(values)):
	s += str(values[i]) + ' '
print(s)


columns_quantity_n = int(input())
box = []
columns = list(map(int, input().split()))
for i in range(columns_quantity_n):
	toy_cubes = columns[i]
	box.append(toy_cubes)
box.sort()
print(' '.join(map(str, box)))


a = int(input())
l = list(map(int, input().split()))
l.sort()
print(*l)


def bubble(alist):
	n = len(alist)
	for i in range(0, n - 1):
		for j in range(0, n - 1):
			if int(alist[j]) > int(alist[j + 1]):
				swap(j, j + 1, alist)
	return ' '.join(alist)

def swap(i, j, alist):
	(alist[i], alist[j]) = (alist[j], alist[i])
box = []
columns = int(input(''))
each_column = str(input(''))
for _ in each_column.split(' '):
	box.append(_)
print(bubble(box))


n = int(input())
N = input().split()
for i in range(n):
	N[i] = int(N[i])
N.sort()
for i in range(n):
	N[i] = str(N[i])
print(' '.join(N))


n = input()
m = input()
a = m.split()
b = []
for i in a:
	b.append(int(i))
b.sort()
a = []
for i in b:
	a.append(str(i))
c = ' '.join(a)
print(c)


n_colunas = int(input())
colunas = map(int, input().split())
colunas = sorted(colunas)
saida = ''
for e in colunas:
	saida += str(e) + ' '
print(saida)


input()
out = sorted(list(map(int, input().split())))
for x in out:
	print(x, end=' ')


n = int(input())
a = sorted(map(int, input().split()))
print(*a)


n = input()
print(str.join(' ', [str(i) for i in sorted([int(i) for i in input().split()])]))


_ = input()
s = sorted(list(map(int, input().split())))
print(' '.join(map(str, s)))


line1 = int(input())
line2 = input()
n = line2.split()
m = []
for i in n:
	m.append(int(i))
m.sort()
y = [str(m[0])]
for x in range(len(m)):
	if x > 0:
		m[x] = str(m[x])
		y.append(' ' + m[x])
a = ''.join(y)
print(a)


n = int(input())
box = [int(x) for x in input().split()]
print(*sorted(box))


numCol = int(input())
cubes = list((int(x) for x in input().split()))
for x in range(numCol):
	for i in range(numCol - 1):
		if cubes[i] > cubes[i + 1]:
			(cubes[i], cubes[i + 1]) = (cubes[i + 1], cubes[i])
print(' '.join((str(x) for x in cubes)))


w = input()
one = [int(i) for i in input().split(' ')]
one.sort()
for i in one:
	print(i, end=' ')


def print_ar(ar):
	string = ''
	for i in ar:
		string += str(i)
		string += ' '
	string.strip()
	print(string)
n = int(input())
numeros = input().split()
columns = []
for i in range(n):
	columns.append(int(numeros[i]))
columns.sort()
print_ar(columns)


fuck = input()
r = sorted([int(x) for x in input().split(' ')])
for i in r:
	print(i, end=' ')


import sys
size = sys.stdin.readline()
columns = sys.stdin.readline().split()
for i in sorted(columns, key=int):
	print(i, end=' ')


import sys
l = map(str, sorted(map(int, sys.stdin.readlines()[1].split())))
print(' '.join(l))


def gravity(seq):
	x = seq[0]
	pos = 0
	for i in range(len(seq)):
		if int(seq[i]) < int(x):
			x = seq[i]
			pos = i
	return [x, pos]
n = input()
n = int(n)
numbers = input().split()
out = []
i = 0
while len(numbers) != 0:
	x = gravity(numbers)
	numbers.pop(x[1])
	out.append(x[0])
print(' '.join(out))


n = int(input())
line = [int(i) for i in input().split()]
line.sort()
line2 = [str(i) for i in line]
print(' '.join(line2))


x = eval(input())
m = list(map(int, input().split()))
n = sorted(m)
print(*n, sep=' ')


import sys

def gravity():
	n_cols = int(input())
	columnas = input()
	columnas = columnas.split(' ')
	columnas = [int(i) for i in columnas]
	tabla = []
	rango = max(columnas)
	for i in range(0, rango):
		string = ''
		for e in range(0, n_cols):
			if columnas[e] > 0:
				string += '1'
				columnas[e] = columnas[e] - 1
			else:
				string += '0'
		tabla.insert(0, string)
	output_t = []
	for e in tabla:
		elems = e.count('1')
		string = '0' * (n_cols - elems)
		string += '1' * elems
		output_t.append(string)
	output = []
	for n in range(0, n_cols):
		suma = 0
		for elem in output_t:
			if elem[n] == '1':
				suma += 1
		output.append(str(suma))
	print(' '.join(output))
gravity()


times = int(input())
string = input()
numbers = string.split(' ')
number_list = []
for number in numbers:
	number_list.append(int(number))
number_list.sort()
new_string = ''
for number in number_list:
	new_string += str(number)
	new_string += ' '
print(new_string)


num = int(input())
s = input()
lst = s.split()
for i in range(len(lst)):
	lst[i] = int(lst[i])
lst = sorted(lst)
for i in range(len(lst)):
	print(lst[i], end=' ')


n = int(input())
a = [int(x) for x in input().split()]
a.sort()
print(' '.join((str(x) for x in a)))


input()
m = list(map(int, input().split()))
m.sort()
print(*m)


n = int(input(''))
a = list(map(int, input().split()))
for nn in range(0, n):
	for i in range(0, len(a) - 1):
		if a[i + 1] < a[i] and a[i] > 0:
			amount = -(a[i + 1] - a[i])
			a[i] -= amount
			a[i + 1] += amount
out = str(a[0])
i = 0
for c in a:
	if i > 0:
		out += ' ' + str(c)
	i += 1
print(out)


n = int(input())
arr = list(map(int, input().split()))
exit = False
flag = 1
while flag == 1:
	flag = 0
	for i in range(1, len(arr)):
		if arr[i] < arr[i - 1]:
			diff = arr[i - 1] - arr[i]
			arr[i] += diff
			arr[i - 1] -= diff
			flag = 1
print(*arr)


def read_int():
	return int(input())

def read_ints():
	return list(map(int, input().split()))
_ = read_int()
values = sorted(read_ints(), reverse=False)
print(''.join(('{} '.format(elem) for elem in values)).strip(' '))


n = int(input())
lst = list(map(int, input().split()))
lst.sort()
print(*lst)


_ = input()
output = sorted(map(int, input().split()))
print(' '.join(map(str, output)))


column_count = int(input(''))
cube_count = input('')
cube_count = cube_count.split()
lst = list()
for num in cube_count:
	num = int(num)
	lst.append(num)
for i in lst:
	lst = sorted(lst)
for number in lst:
	print(number, end=' ')


number = int(input())
var = [int(var) for var in input().split()]
var.sort()
for i in var:
	print(i, end=' ')


n = int(input())
x = sorted([int(q) for q in input().split()])
print(*x)


n = int(input())
begin = [int(i) for i in input().split()]
begin.sort()
for k in begin:
	print(k, end=' ')


n = int(input())
m = [int(x) for x in input().split()]
m.sort()
s = ''
for i in range(n):
	s = s + str(m[i]) + ' '
print(s)


n = int(input())
a = list(map(int, input().split(maxsplit=n - 1)))
print(*sorted(a))


n = int(input())
inp = [int(x) for x in input().split()]
inv = [0 for x in range(0, 147)]
for x in inp:
	for v in range(0, x):
		inv[v] += 1
res = []
for i in range(0, n):
	x = 0
	while inv[x] >= n - i:
		x += 1
	res.append(str(x))
print(' '.join(res))


n = int(input())
a = list(map(int, input().split()))
b = [0 for i in range(int(max(a) + 1))]
for ai in a:
	b[ai] += 1
for i in range(len(b)):
	for k in range(int(b[i])):
		print(i, end=' ')


def get_ans(v):
	return sorted(v)

def main():
	n = int(input())
	v = list(map(int, input().split()))
	print(*get_ans(v))
main()


total = input()
cubos = input()
numero_cubos = cubos.split()
for i in range(int(total) - 1, -1, -1):
	for j in range(int(total) - 1):
		if j + 1 < int(total):
			valid = int(numero_cubos[j]) > int(numero_cubos[j + 1])
			if valid:
				aux = int(numero_cubos[j])
				numero_cubos[j] = int(numero_cubos[j + 1])
				numero_cubos[j + 1] = int(aux)
print(*numero_cubos)


import sys
sys.stdin.readline()
cols = [int(x) for x in sys.stdin.readline().split()]
cols = sorted(cols)
for i in range(0, len(cols) - 1):
	print(str(cols[i]) + ' ', end='')
print(cols[-1])


n = int(input())
columns = list(map(int, input().split(' ')))
columns.sort()
output = str(columns[0])
for ele in columns[1:]:
	output += ' ' + str(ele)
print(output)


num_col = int(input())
cols = [int(x) for x in input().strip().split()]
cols.sort()
print(*cols)


input()
print(*sorted([int(i) for i in input().split()]))


n = int(input().strip())
cube = list(map(int, input().split(' ')))
cube = sorted(cube)
result = ''
for i in cube:
	result += str(i) + ' '
print(result.strip())


n = input()
a = input().split()
for i in range(len(a)):
	a[i] = int(a[i])
a = sorted(a)
d = str(a[0])
for i in range(1, len(a)):
	d = d + ' ' + str(a[i])
print(d)


t = int(input())
a = list(map(int, input().split()))
a.sort()
s = ''
for i in a:
	s += str(i) + ' '
print(s, ' ')


a = int(input())
c = [int(x) for x in input().split()]
for i in range(a):
	for i in range(a - 1):
		if c[i] > c[i + 1]:
			temp = c[i]
			c[i] = c[i + 1]
			c[i + 1] = temp
for i in range(a):
	print(c[i], end=' ')


n = int(input())
b = list(map(int, input().split()))
b = sorted(b)
for i in range(len(b)):
	print(b[i], end=' ')


def print_matrix(matrix):
	for col in matrix:
		print(col)
	print('\n')
size = int(input())
data = input()
cubos = [int(i) for i in data.split(' ')]
max = max(cubos)
matrix = []
for col in range(size):
	cubos_col = []
	for c in range(max):
		if c < cubos[col]:
			cubos_col.append('X')
		else:
			cubos_col.append('-')
	matrix.append(cubos_col)
contar = []
for j in range(max):
	contador = 0
	for i in range(size):
		if matrix[i][j] == 'X':
			contador += 1
	contar.append(contador)
flipped_matrix = []
for i in range(max):
	flip_cols = []
	for c in range(size):
		if c < contar[i]:
			flip_cols.append('X')
		else:
			flip_cols.append('-')
	flipped_matrix.append(flip_cols)
contar_flip = []
for j in range(size):
	cont = 0
	for i in range(max - 1, -1, -1):
		if flipped_matrix[i][j] == 'X':
			cont += 1
	contar_flip.append(cont)
output_list = list(reversed(contar_flip))
output = ''
for i in output_list:
	output = output + ' ' + str(i)
output = output[1:]
print(output)


input()
s = input().split()
for i in range(len(s)):
	s[i] = int(s[i])
s = sorted(s)
ans = ''
for i in range(len(s)):
	ans += str(s[i])
	if i != len(s) - 1:
		ans += ' '
print(ans)


x = input()
lst = sorted(list(map(int, input().split())))
ans = ''
for i in lst:
	ans += str(i) + ' '
print(ans)


n = int(input())
a = [int(i) for i in input().split()]
a.sort()
for i in a:
	print(i, end=' ')


n = int(input())
c = sorted(map(int, input().split()))
for i in c:
	print(i, end=' ')


import sys

def gravity_flip_solve(r, w):
	col_count = int(r.readline())
	data = r.readline().split()
	col_boxes = []
	row_count = 0
	for i in data:
		val = int(i)
		row_count = max(row_count, val)
		col_boxes.append(val)
	row_boxes = [0 for _ in range(row_count)]
	for i in col_boxes:
		while i > 0:
			i -= 1
			row_boxes[i] += 1
	result = [0 for _ in range(col_count)]
	for i in row_boxes:
		while i > 0:
			result[col_count - i] += 1
			i -= 1
	result_output = ''
	delim = ''
	for val in result:
		result_output += delim + str(val)
		delim = ' '
	result_output += '\n'
	w.write(result_output)
gravity_flip_solve(sys.stdin, sys.stdout)


n = int(input())
l = list(input().split())
l = list(map(int, l))
l.sort()
l = list(map(str, l))
l = ' '.join(l)
print(l)


e = int(input())
d = [int(x) for x in input().split()]
k = sorted(d)
print(' '.join((str(i) for i in k)))


a = input()
b = input().split()
c = [int(i) for i in b]
for i in sorted(c):
	print(i, end=' ')


n = int(input())
L = list(map(int, input().split()))
L.sort()
r = ''
for k in range(n):
	r += str(L[k]) + ' '
print(r)


m = input()
n = [int(x) for x in input().split()]
k = sorted(n)
print(' '.join([str(l) for l in k]))


n = int(input())
lst = list(map(int, input().split()))
maxi = 102
for j in range(maxi):
	for i in range(1, n):
		if lst[i] < lst[i - 1]:
			temp = lst[i - 1] - lst[i]
			lst[i - 1] -= temp
			lst[i] += temp
print(*lst)


n = int(input())
a = [int(x) for x in input().split()]
a = sorted(a)
print(*a)


n = int(input())
L = input().split()
L = [int(i) for i in L]
L.sort()
L = [str(i) for i in L]
print(' '.join(L))


n = int(input())
nums = [int(i) for i in input().split()]
b = max(nums)
new = [0] * b
for i in nums:
	for k in range(i):
		new[k] = new[k] + 1
c = max(new)
hh = [0] * c
for i in new:
	for k in range(i):
		hh[k] = hh[k] + 1
hh.sort()
for i in hh:
	print(i, end=' ')


s = int(input())
a = list(map(int, input().split(' ')))
i = s - 1
while i != 0:
	if a[i] < a[i - 1]:
		x = a[i]
		a[i] = a[i - 1]
		a[i - 1] = x
		i += 1
	if i > s - 1:
		i -= 1
	if a[i] >= a[i - 1]:
		i -= 1
a = list(map(str, a))
s1 = str()
for i in range(len(a)):
	s1 += a[i] + ' '
print(s1)


n = int(input())
columns = list(map(int, input().split()))
columns.sort()
for i in range(n):
	print(columns[i], end=' ')


n = int(input())
num = [0] * n
line = input().split()
for i in range(n):
	num[i] = int(line[i])
num.sort()
for i in range(n):
	num[i] = str(num[i])
print(' '.join(num))


inp = input()
l = sorted(list(map(int, input().split())))
for _ in l:
	print(_, end=' ')


def main():
	n = int(input())
	s = list(map(int, input().split(' ')))
	s.sort()
	stri = ''
	for j in s:
		stri += ' ' + str(j)
	print(stri.strip())
main()


n = int(input())
a = [int(i) for i in input().split()]
for i in range(n - 1):
	for j in range(i + 1, n):
		if a[i] > a[j]:
			t = a[i]
			a[i] = a[j]
			a[j] = t
for i in range(n):
	print(a[i], end=' ')


i = int(input(''))
y = input('')
s = y.split()
s = [int(y) for y in s]
s.sort()
j = 0
r = ''
while j < i:
	r += str(s[j]) + ' '
	j += 1
	pass
print(r)


T = int(input())
box = list(map(int, input().split()))
box.sort()
for i in box:
	print(i, end=' ')


from sys import stdin, stdout
n = int(stdin.readline()) - 1
c = [int(x) for x in stdin.readline().split()]
ans = []
i = 0
for x in reversed(c):
	i = n
	while i >= 0:
		if x < c[i]:
			dif = c[i] - x
			x = x + dif
			c[i] = c[i] - dif
		i = i - 1
	ans.append(x)
	n = n - 1
print(*reversed(ans))


n = int(input())
m = [int(i) for i in input().split()]
m.sort()
print(' '.join((str(i) for i in m)))


def mergeSort(alist):
	if len(alist) > 1:
		mid = len(alist) // 2
		lefthalf = alist[:mid]
		righthalf = alist[mid:]
		mergeSort(lefthalf)
		mergeSort(righthalf)
		i = 0
		j = 0
		k = 0
		while i < len(lefthalf) and j < len(righthalf):
			if lefthalf[i] < righthalf[j]:
				alist[k] = lefthalf[i]
				i = i + 1
			else:
				alist[k] = righthalf[j]
				j = j + 1
			k = k + 1
		while i < len(lefthalf):
			alist[k] = lefthalf[i]
			i = i + 1
			k = k + 1
		while j < len(righthalf):
			alist[k] = righthalf[j]
			j = j + 1
			k = k + 1

def crear_lista(string):
	lista = []
	cambio = False
	num = ''
	for letra in string + ' ':
		if letra == ' ':
			cambio = True
			lista.append(int(num))
			num = ''
		if not cambio:
			num += letra
		cambio = False
	return lista

def join_propio(lista):
	string = ''
	for elem in lista:
		string += str(elem) + ' '
	return string[:-1]
cantidad = int(input())
lista = crear_lista(input())
mergeSort(lista)
print(join_propio(lista))


n = int(input())
columns = map(int, input().split())
columns = sorted(list(columns))
print(' '.join([str(e) for e in columns]))


n = int(input())
a = list(map(int, input().split()))
a.sort()
print(' '.join((str(a[i]) for i in range(n))))


n = int(input())
h = [int(x) for x in input().split()]
y = sorted(h)
if y:
	for x in y:
		print(x)


def get():
	n = int(input())
	cols = [int(x) for x in input().split(' ')]
	return (n, cols)

def _print(_list):
	from sys import stdout
	for e in _list:
		stdout.write(str(e) + ' ')
	stdout.write('\n')

def gravity(cols):
	if cols == []:
		return cols
	left_cols = []
	right_cols = []
	center_cols = []
	for i in range(len(cols)):
		if cols[i] < cols[0]:
			left_cols += [cols[i]]
		elif cols[i] > cols[0]:
			right_cols += [cols[i]]
		else:
			center_cols += [cols[i]]
	return gravity(left_cols) + center_cols + gravity(right_cols)
(n, cols) = get()
_print(gravity(cols))


from sys import stdin

def main():
	n = int(stdin.readline())
	cubs = [int(x) for x in stdin.readline().split()]
	dif = 0
	cont = 0
	j = 1
	parameter = 1
	if n > 1:
		while parameter > 0:
			if j == n:
				j = 1
				cont = 0
				parameter = 1
			if cubs[cont] > cubs[j]:
				dif = cubs[cont] - cubs[j]
				cubs[j] = dif + cubs[j]
				cubs[cont] = cubs[cont] - dif
				parameter += 1
			cont += 1
			j += 1
			if parameter == 1 and j == n:
				break
	for i in cubs:
		print(i, end=' ')
	print()
main()


n: int = int(input())
arr: list = list(map(int, input().split(' ')))
arr.sort()
print(' '.join(list(map(str, arr))))


x = int(input(''))
ar = list(map(int, input().strip().split(' ')))
ar.sort()
z = ''
for i in ar:
	z = z + str(i) + ' '
print(z)


from math import *
from copy import *
from string import *
from random import *
from sys import stdin
from sys import maxsize
from operator import *
from itertools import *
from collections import Counter
import math

def bin1(l, r, k, t, b, val, ans):
	if l > r:
		return ans
	else:
		mid = (l + r) // 2
		v = k ** mid
		if v == val:
			return v
		elif v > val:
			ans = mid
			return bin1(mid + 1, r, k, t, b, val, ans)
		else:
			return bin1(l, mid - 1, k, t, b, val, ans)

def bin2(l, r, k, t, b, val, ans):
	if l > r:
		return ans
	else:
		mid = (l + r) // 2
		v = t * k ** mid + b * mid
		if v == val:
			return v
		elif v > val:
			ans = mid
			return bin2(l, mid - 1, k, t, b, val, ans)
		else:
			return bin2(mid + 1, r, k, t, b, val, ans)

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	l = []
	for i in range(2, n + 1):
		if prime[i]:
			l.append(i)
	return l

def bin(l, r, ll, val):
	if l > r:
		return -1
	else:
		mid = (l + r) // 2
		if val >= ll[mid][0] and val <= ll[mid][1]:
			return mid
		elif val < ll[mid][0]:
			return bin(l, mid - 1, ll, val)
		else:
			return bin(mid + 1, r, ll, val)

def deci(n):
	s = ''
	while n != 0:
		if n % 2 == 0:
			n = n // 2
			s = '0' + s
		else:
			n = n // 2
			s = '1' + s
	return s

def diff(s1, s2):
	if len(s1) < len(s2):
		v = len(s1)
		while v != len(s2):
			s1 = '0' + s1
			v = v + 1
	else:
		v = len(s2)
		while v != len(s1):
			s2 = '0' + s2
			v = v + 1
	c = 0
	for i in range(len(s1)):
		if s1[i:i + 1] != s2[i:i + 1]:
			c = c + 1
	return c
from sys import stdin, stdout

def fac(a, b):
	v = a
	while a != b:
		v *= a - 1
		a = a - 1
	return v

def bino(l, r, n):
	if l > r:
		return -1
	else:
		mid = (l + r) // 2
		val1 = math.log(n / mid + 1, 2)
		val2 = int(val1)
		if val1 == val2:
			return val1
		elif val1 < 1.0:
			return bino(l, mid - 1, n)
		else:
			return bino(mid + 1, r, n)

def binary(l, r, ll, val, ans):
	if l > r:
		return ans
	else:
		mid = (l + r) // 2
		if ll[mid] <= val:
			ans = mid
			return binary(mid + 1, r, ll, val, ans)
		else:
			return binary(l, mid - 1, ll, val, ans)
n = int(stdin.readline())
l = list(map(int, stdin.readline().split(' ')))
l.sort()
print(*l)


n = int(input())
l = [int(k) for k in input().split(' ')]
m = [0 for k in range(100)]
r = [0 for k in range(len(l))]
for i in range(len(l)):
	for j in range(l[i]):
		m[j] += 1
for i in range(len(l)):
	for j in m:
		if j > i:
			r[i] += 1
r = [str(k) for k in r]
r.reverse()
print(' '.join(r))


n = int(input())
a = list(map(int, input().split()))
for i in range(1, len(a)):
	p = a[i]
	j = i
	while j > 0 and p < a[j - 1]:
		a[j] = a[j - 1]
		j -= 1
	a[j] = p
str = ' '.join((str(e) for e in a))
print(str)


n = int(input())
arr = list(map(int, input().split()))
print(*sorted(arr))


n = int(input())
l = input().split()
l = [int(j) for j in l]
l.sort()
l = [str(j) for j in l]
print(' '.join(l))


p = int(input())
asd = [int(k) for k in input().split()]
asd.sort()
asd = [str(x) for x in asd]
a = ' '.join(asd)
print(a)


n = input()
a = [int(i) for i in input().split()]
b = sorted(a)
c = []
for value in b:
	d = str(value)
	c.append(d)
print(' '.join(c))


c = int(input())
nums = list(map(int, input().split()))

def sort(arr):
	for i in range(len(arr)):
		for j in range(1, len(arr) - i):
			if arr[j - 1] > arr[j]:
				(arr[j - 1], arr[j]) = (arr[j], arr[j - 1])
	return arr
print(' '.join((str(i) for i in sort(nums))))


n = int(input())
a_list = [int(x) for x in input().split()]
a_list.sort()
print(' '.join((str(x) for x in a_list)))


input()
cols = list(map(int, input().split(' ')))
cols.sort()
print(' '.join(list(map(str, cols))))


a = int(input())
b = list(map(int, input().split(' ')))
c = list()
for i in range(0, a):
	d = list()
	for j in range(0, b[i]):
		d.append(1)
	c.append(d)
c.sort()
for i in range(0, a):
	e = c[i].count(1)
	print(e, end=' ')


n = int(input())
s = input().split()
s = list(map(int, s))
for i in range(n):
	for j in range(n):
		if s[i] < s[j]:
			d = s[i] - s[j]
			s[i] = s[i] - d
			s[j] = s[j] + d
for i in s:
	print(i, end=' ')


import sys
numCols = input()
list1 = map(int, input().split(' '))
list1 = sorted(list1)
for num in list1:
	print(str(num) + ' ', end='')
print('\n')


columns = int(input())
k = map(int, input().split())
sk = sorted(k)
for i in sk:
	print(i, end=' ')


n = int(input())
s = [int(j) for j in input().split()]
s.sort()
print(*s)


n = int(input())
m = input()
m = m.split()
for i in range(n):
	m[i] = int(m[i])
m.sort()
for i in range(n):
	print(m[i], end=' ')


n = int(input())
cubes = list(map(int, input().strip().split()))[:n]
cubes = sorted(cubes)
print(*cubes)


num_col = int(input())
columns = input()
columns = columns.split(' ')
col = list(map(lambda x: int(x), columns))
maximun = max(col)
columnas = []
for column in col:
	aux = []
	for i in range(column):
		aux.append(1)
	while maximun > len(aux):
		aux.append(0)
	columnas.append(aux)
filas = []
for i in range(1, maximun + 1):
	aux = []
	for j in columnas:
		aux.append(j[len(j) - i])
	aux.sort()
	filas.append(aux)
valores = []
for j in range(num_col):
	valores.append(0)
contador = 0
for i in filas:
	for (enum, j) in enumerate(i):
		valores[enum] += j
string = ''
for j in valores:
	string += str(j) + ' '
print(string.rstrip())


from sys import stdin
n = stdin.readline()
arr = [int(x) for x in stdin.readline().split()]
print(*sorted(arr))


cantidad = int(input())
columnas_entrada = input()
sucio = columnas_entrada.split(' ')
limpio = []
for i in sucio:
	limpio.append(int(i))
limpio = sorted(limpio)
output = str(limpio.pop(0))
for i in limpio:
	output += ' ' + str(i)
print(output)


n = int(input())
s = list(map(int, input().split(' ')))
s.sort()
a = ''
for j in s:
	a += ' ' + str(j)
print(a.strip())


n = int(input())
l = [int(i) for i in input().split()]
l = sorted(l)
for i in range(n):
	l[i] = str(l[i])
l = ' '.join(l)
print(l)


n = int(input())
l = list(map(int, input().split()))
print(*sorted(l))


n = int(input())
a = list(map(int, input().split(maxsplit=n - 1)))
b = sorted(a)
c = str(b)[1:-1]
print(c.replace(',', ''))


a = int(input())
b = input()
b = b.split()
for i in range(0, a):
	b[i] = int(b[i])
b.sort()
c = str()
for k in range(0, a):
	b[k] = str(b[k])
	c = c + b[k] + ' '
print(c)


n = input()
s = input()
l = []
for i in map(int, s.split()):
	l.append(i)
a = ' '.join(map(str, sorted(l)))
print(a)


x = int(input())
p = sorted(list(map(int, input().split())))
for i in p:
	print(i, end=' ')


n = int(input())
p = [int(i) for i in input().split()]
p.sort()
for i in range(n - 1):
	print(p[i], end=' ')
print(p[n - 1])


n = int(input())
li = list(map(int, input('').split()[:n]))
t = 0
for i in range(n - 1):
	for j in range(n - 1):
		if li[j + 1] < li[j]:
			t = li[j]
			li[j] = li[j + 1]
			li[j + 1] = t
print(*li)


dont = input()
foo = input().split(' ')
foo = list(map(int, foo))
foo.sort()
foo = list(map(str, foo))
print(' '.join(foo))


n = int(input())
s = sorted([int(x) for x in input().split()])
print(*s)


def bubble(arr):
	n = len(arr)
	for i in range(n):
		for j in range(0, n - i - 1):
			if arr[j] > arr[j + 1]:
				(arr[j], arr[j + 1]) = (arr[j + 1], arr[j])
n = int(input())
arr = list(map(int, input().split()))
if n == len(arr):
	bubble(arr)
	for i in range(len(arr)):
		print(arr[i], end=' ')


n = int(input())
lis = [int(x) for x in input().split()]
lis.sort()
print(' '.join([str(elem) for elem in lis]))


n = int(input())
s = [int(x) for x in input().split(' ')]
print(' '.join([str(x) for x in sorted(s)]))


x = input()
arr = input().split()
arr = [int(x) for x in arr]
arr.sort()
arr = [str(x) for x in arr]
ans = ' '.join(arr)
print(ans)


n = int(input())
li = [int(n) for n in input().split()]
li.sort()
for i in range(n):
	print(li[i], end=' ')


def box(l):
	l.sort()
	s1 = ''
	for i in l:
		s1 += str(i) + ' '
	return s1
n = int(input())
l = list(map(int, input().split()))
print(box(l))


input()
char_list = input().split(' ')
int_list = [int(element) for element in char_list]
int_list.sort()
print(*int_list)


def to_list(s):
	return list(map(lambda x: int(x), s.split(' ')))

def solve(a):
	for i in range(len(a) - 1, 0, -1):
		max_num = a[i]
		for j in range(i - 1, -1, -1):
			if a[j] > max_num:
				diff = a[j] - max_num
				a[j] -= diff
				a[i] += diff
				max_num += diff
	str_a = list(map(lambda x: str(x), a))
	return ' '.join(str_a)
n = int(input())
a = to_list(input())
print(solve(a))


n = int(input())
a = list(map(int, input().split()))
b = a
for i in range(1, n)[::-1]:
	for j in range(i)[::-1]:
		if b[i] < a[j]:
			x = a[j] - b[i]
			b[i] += x
			a[j] -= x
			b[j] = a[j]
print(*b)


a = eval(input())
b = [eval(i) for i in input().split()]
c = max(b)
cubePic = []
for i in range(c):
	cubePic.append([])
for i in range(c):
	for j in range(a):
		cubePic[i].append(0)
for i in range(a):
	for j in range(b[i]):
		cubePic[c - 1 - j][i] = 1
for i in range(c):
	cubePic[i] = sorted(cubePic[i])
for i in range(a):
	count = 0
	for j in range(c):
		count += cubePic[j][i]
	print(count, end=' ')


n = int(input())
c = input()
c = c.split()
c = list(map(int, c))
r = []
for i in range(200):
	t = 0
	for j in range(n):
		if c[j] > 0:
			c[j] -= 1
			t += 1
	r.append(t)
c2 = []
for i in range(n):
	t = 0
	for j in range(200):
		if r[j] > 0:
			r[j] -= 1
			t += 1
	c2.append(t)
c2.reverse()
for i in c2:
	print(i, end=' ')


import sys
import os
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import math
import random
import re
import heapq
n = int(input())
print(' '.join(map(str, sorted(map(int, input().split())))))


x = int(input())
y = input().split()
l = []
for i in y:
	i = int(i)
	l.append(i)
for u in range(x):
	for i in range(len(l)):
		for j in range(len(l) - 1, -1, -1):
			if i <= j:
				break
			if j > 0:
				if l[i] <= l[j]:
					break
				else:
					while l[i] > l[j]:
						l[i] -= 1
						l[j] += 1
			print(l)
	if l == l.sort():
		break
for i in l:
	print(i, end=' ')


n = int(input())
L = [int(i) for i in input().split()]
a = max(L)
A = []
m = 1
while m <= a:
	b = 0
	for k in L:
		if k >= m:
			b = b + 1
		else:
			pass
	m = m + 1
	A.append(b)
c = max(A)
k = c
B = []
while k <= c and k >= 1:
	p = 0
	for i in A:
		if i >= k:
			p = p + 1
		else:
			pass
	B.append(p)
	k = k - 1
for i in B:
	print(i)


a = int(input())
l1 = list(map(int, input().split()))
l1.sort()
print(*l1)


a = int(input())
b = list(map(int, input().split()))
c = sorted(b)
print(*c, end=' ')


n = int(input())
numbers = input().split(' ')
aux = [int(i) for i in numbers]
aux.sort()
aux2 = [str(i) for i in aux]
result = ' '.join(aux2)
print(result)


cols = int(input())
nums = [int(x) for x in input().strip().split(' ')]
retArr = [0 for x in range(cols)]
num = 0
for x in range(101, 0, -1):
	num += nums.count(x)
	for i in range(cols - num, cols):
		retArr[i] += 1
print(*retArr, sep=' ')


a = int(input())
b = list(map(int, input().split()))
b.sort()
for x in range(a):
	print(b[x], end=' ')


n = int(input())
a = sorted([int(i) for i in input().split()])
for i in a:
	print(i, end=' ')


n = int(input())
a = map(int, input().split())
a = list(a)
b = [0] * (max(a) + 1)
for i in a:
	b[i] = b[i] + 1
for i in range(max(a) + 1):
	if b[i] > 0:
		print((str(i) + ' ') * b[i], end='')


n = input()
print(*sorted(list(map(int, input().split()))), sep=' ')


cubes = int(input())
box = list(map(int, input().split()))
gravity = []
box.sort()
for i in range(len(box)):
	print(box[i], end=' ')


n = int(input())
a = list(map(int, input().split()))
mx = max(a)
r = [0] * n
for i in range(1, mx + 1):
	c = 0
	for _ in a:
		c += _ >= i
	for j in range(n - c, n):
		r[j] += 1
print(*r)


n = input()
l = [int(i) for i in input().split()]
for i in sorted(l):
	print(i, end=' ')


n = int(input())
i = sorted(list(map(int, input().split())))
l = []
for j in range(len(i)):
	l.append(str(i[j]))
s = ' '.join(l)
print(s)


count = int(input())
numbers = list(map(int, input().split()))
numbers.sort()
print(' '.join(map(str, numbers)))


n = input()
list1 = [int(x) for x in input().split()]
list1.sort()
list2 = [str(x) for x in list1]
b = ' '.join(list2)
print(b)


n = int(input())
nums = list(map(int, input().split(' ')))
print(' '.join(map(str, sorted(nums))))


useless = input()

def newGravityOrder(order):
	order.sort()
	return order
for i in newGravityOrder(list(map(int, input().split(' ')))):
	print(i, end=' ')


n = int(input())
b = list(map(int, input().split()))
a = []
for i in range(n):
	a.append(b[i])
a.sort()
for i in range(n):
	print(a[i], end=' ')


n = int(input())
a = [int(j) for j in input().split()]
a.sort()
print(*a)


n = int(input())
l = list((int(x) for x in input().strip().split()))[:n]
for i in sorted(l):
	print(i, end=' ')


n = int(input())
s = list(map(int, input().split()))
s = sorted(s)
for i in range(n):
	print(s[i], end=' ')


import sys
print(' '.join(sorted(sys.stdin.readlines()[1].split(), key=int)))


n = int(input())
box = list(map(int, input().split()))
box = sorted(box)
box = [str(x) for x in box]
box = ' '.join(box)
print(box)


size = int(input())
cubes = list(map(int, input().split()))
cubes.sort()
print(*cubes, sep=' ')


import sys

def quicksort(arr):
	lesser = []
	greater = []
	if len(arr) > 1:
		pivot = arr[len(arr) - 1]
		start = 0
		while start < len(arr):
			if arr[start] > pivot:
				greater.append(arr.pop(start))
			elif arr[start] < pivot:
				lesser.append(arr.pop(start))
			else:
				start = start + 1
		return quicksort(lesser) + arr + quicksort(greater)
	else:
		return arr

def my_sort(input_file):
	n = int(input_file.readline())
	a = [int(x) for x in input_file.readline().split()]
	a = quicksort(a)
	for val in a:
		print(val)
my_sort(sys.stdin)


def gravityMaster():
	n = int(input(''))
	stacks = input('').split(' ')
	for i in range(len(stacks)):
		stacks[i] = int(stacks[i])
	for i in sorted(stacks):
		print(i, end=' ')
gravityMaster()


import copy
n = int(input())
heights = list(map(int, input().split()))
init_height = copy.deepcopy(heights)
do = True
while init_height != heights or do:
	do = False
	init_height = copy.deepcopy(heights)
	for i in range(n):
		if i + 1 < n and heights[i] > heights[i + 1]:
			h = heights[i]
			h2 = heights[i + 1]
			heights[i + 1] += h - heights[i + 1]
			heights[i] -= h - h2
for h in heights:
	print(h, end=' ')


n = int(input())
a = []
a = list(map(int, input().split()))
a.sort()
print(' '.join(map(str, a)))


col = int(input())
blocks = input().strip().split(' ')
gravity = sorted([int(i) for i in blocks])
print(*gravity, sep=' ')


number = int(input())
value = input()
value = value.split(' ')
valuelist = []
for i in value:
	valuelist.append(int(i))
valuelist.sort()
output = ''
for i in valuelist:
	output += str(i) + ' '
print(output)


n = int(input())
start = [int(x) for x in input().split(' ')]
print(*sorted(start))


N = int(input())
Arr = [int(x) for x in input().split()]
for i in range(len(Arr)):
	pos = i
	aux = Arr[i]
	while pos > 0 and Arr[pos - 1] > aux:
		Arr[pos] = Arr[pos - 1]
		pos -= 1
	Arr[pos] = aux
cad = ''
for x in range(len(Arr)):
	cad += str(Arr[x]) + ' '
print(cad)


n = input()
l = input()
j = [int(i) for i in l.split(' ')]
j.sort()
for i in j:
	print(i, end=' ')


x = eval(input())
w = list(map(int, input().split()))
w = sorted(w)
i = 0
while i < len(w):
	print(w[i], end=' ')
	i += 1


i = int(input())
list_input = list(map(int, input().split()))
list_input = sorted(list_input)
print(*list_input)


n = int(input())
a = list(map(int, input().split()))
for i in reversed(range(n)):
	for j in range(i):
		if a[i] < a[j]:
			dif = a[j] - a[i]
			a[i] += dif
			a[j] -= dif
for g in range(n):
	print(a[g], end=' ')


n = int(input())
a = [int(x) for x in input().split()]
for i in range(n):
	j = i + 1
	for j in range(n - 1):
		if a[i] <= a[j]:
			temp = a[i]
			a[i] = a[j]
			a[j] = temp
r = ''
for i in range(n):
	r += f'{a[i]} '
print(r)


n = int(input())
inp = list(map(int, input().split()))
inp.sort()
print(*inp)


i = input
i()
print(*sorted(map(int, i().split())))


n = int(input())
box = input().split()
for i in range(0, n):
	box[i] = int(box[i])
box.sort()
boxr = []
for q in range(0, n):
	boxr.append(str(box[q]))
	boxr.append(' ')
print(''.join(boxr))


N = int(input())
sizes = map(int, input().split(' '))
print(' '.join((str(x) for x in sorted(sizes))))


n = int(input())
L = [int(x) for x in input().split()]
L.sort()
new = [str(x) for x in L]
print(' '.join(new))


columns = int(input())
values = list(map(int, input().split()))
values.sort()
print(' '.join(map(str, values)))


n = int(input())
a = list(map(int, input().split()))
c = []
c.extend(a)
c.sort()
print(*c)


import sys, os.path
sys.setrecursionlimit(10 ** 5)

def i():
	return sys.stdin.readline().strip()

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

def li():
	return list(sys.stdin.readline().strip())

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

def lii():
	return list(map(int, sys.stdin.readline().strip().split()))
a = ii()
b = sorted(lii())
print(*b)


num = int(input())
stnum = list(map(int, input().strip().split()))[:num]
print(*sorted(stnum))


a = int(input())
bb = input()
list1 = [int(i) for i in bb.split()]
list2 = sorted(list1)
for i in range(a):
	print(list2[i], end=' ')


from typing import List

def solve(*, _input: List[int]) -> List[int]:
	return sorted(_input)
columns_number = input()
solution = solve(_input=list(map(int, input().split())))
print(*solution)


a = int(input())
mid = [int(i) for i in input().split()]
ans = a * [0]
while max(mid) != 0:
	for i in range(mid.count(0), a):
		ans[i] += 1
	for i in range(a):
		if mid[i] != 0:
			mid[i] -= 1
for i in range(a):
	print(ans[i], end=' ')


n = int(input())
a = list(map(int, input().split()))
for k in range(n - 1):
	for i in range(n - 1 - k):
		if a[i] > a[i + 1]:
			b = a[i]
			a[i] = a[i + 1]
			a[i + 1] = b
for i in range(n):
	print(a[i], end=' ')


n = int(input())
s = sorted([int(i) for i in input().split()])
for i in range(n - 1):
	print(s[i], end=' ')
print(s[n - 1])


import sys

def main():
	n = int(sys.stdin.readline().strip())
	list = [int(x) for x in sys.stdin.readline().strip().split()]
	list = sorted(list)
	list = [str(n) for n in list]
	print(' '.join(list))
main()


a = int(input())
b = list(map(int, input().split()))
b.sort()
for i in range(a - 1):
	print(b[i], end=' ')
print(b[-1])


n = int(input())
line = input()
line = [int(i) for i in line.split()]
line = sorted(line)
out = ''
for i in range(n):
	out += str(line[i]) + ' '
print(out)


n = int(input())
a = [k for k in map(int, input().split())]
for i in range(n):
	for j in range(n - 1, i, -1):
		if a[j] < a[j - 1]:
			temp = a[j]
			a[j] = a[j - 1]
			a[j - 1] = temp
print(' '.join((str(k) for k in a)))


input()
print(*sorted(list(map(int, input().split()))))


n = int(input(''))
m = sorted([int(x) for x in input('').split(' ')])
for i in m:
	print(i, end=' ')


n = int(input())
casa = input().split(' ')
for i in range(n):
	casa[i] = int(casa[i])
casa.sort()
l = ''
for i in range(n):
	l += str(casa[i])
	if i < n - 1:
		l += ' '
print(l)


input()
z = sorted((i for i in map(int, input().split())))
for i in range(len(z)):
	print(z[i])


n = int(input())
s = ''
list1 = input().split()
for i in range(n):
	list1[i] = int(list1[i])
list1.sort()
for i in range(n):
	s = s + str(list1[i]) + ' '
print(s)


n = int(input())
arr = input().split()
arr = sorted([int(i) for i in arr])
for i in arr:
	print(i, end=' ')
print()


input()
print(' '.join(sorted(input().split(), key=int)))


n = int(input())
t = [int(x) for x in input().split()]
for i in range(n):
	for j in range(i):
		if t[j] > t[i]:
			a = t[j]
			t[j] = t[i]
			t[i] = a
for number in t:
	print(number, end=' ')


k = int(input())
c = list(map(int, input().split()))
print(' '.join(map(str, sorted(c))))


n = int(input())
list = [int(j) for j in input().split()]
rank_list = [str(j) for j in sorted(list)]
print(' '.join(rank_list))


from sys import stdin

def merge(left, right):
	l = []
	while left and right:
		if left[0] < right[0]:
			l.append(left.pop(0))
		else:
			l.append(right.pop(0))
	if left:
		l.extend(left)
	if right:
		l.extend(right)
	return l

def merge_sort(l):
	if len(l) >= 2:
		mid = len(l) >> 1
		l = merge(merge_sort(l[:mid]), merge_sort(l[mid:]))
	return l

def main():
	n = int(stdin.readline())
	if n == 0:
		return
	a = stdin.readline().split(' ')
	b = list(map(lambda x: int(x), a))
	b = merge_sort(b)
	b = map(lambda x: str(x), b)
	print(' '.join(b))
main()


n = int(input())
a = input().split()
b = []
word = ''
for i in range(n):
	b += [int(a[i])]
b.sort()
for i in range(n - 1):
	word += str(b[i]) + ' '
print(word + str(b[-1]))


input()
cols = [int(x) for x in input().split()]
cols.sort()
print(' '.join([str(x) for x in cols]))


arrlen = int(input())
arr = [int(x) for x in input().rstrip().split()]
print(' '.join(map(str, sorted(arr))))


n = int(input())
a = list(map(int, input().split()))
grid = []
for col in a:
	grid.append([1] * col + [0] * (max(a) - col))
lines = []
for i in range(max(a)):
	line_sum = 0
	for col in grid:
		line_sum += col[i]
	lines.append(line_sum)
columns = []
for col in range(len(a)):
	col_sum = 0
	for line in lines:
		if line > col:
			col_sum += 1
	columns.append(col_sum)
print(*columns[::-1])


n = int(input())
p = input().split()
i = 0
a = []
while i < n:
	a.append(int(p[i]))
	i += 1
b = []
i = 0
while i < n:
	b.append(max(a))
	a.remove(max(a))
	i += 1
b.reverse()
i = 0
ans = ''
while i < n:
	ans += str(b[i]) + ' '
	i += 1
print(ans)


input()
list_number = list(map(int, input().split()))
list_number.sort()
print(' '.join(map(str, list_number)))


columns = int(input())
cubes = [int(i) for i in input().split(' ')]
print(*sorted(cubes))


n = input()
a = map(int, input().split())
for i in sorted(a):
	print(i)


n = int(input())
a = list(map(int, input().split()))
c = [0] * (max(a) + 1)
for i in a:
	c[i] += 1
for j in range(len(c)):
	if c[j] > 0:
		print((str(j) + ' ') * c[j], end='')


n = int(input())
num = list(map(int, input().split()))
m = max(num)
box = [[0 for i in range(n)] for j in range(m)]
for j in range(n):
	for i in range(m - 1, m - num[j] - 1, -1):
		box[i][j] = 1
while True:
	count = 0
	for i in range(m):
		for j in range(n - 1):
			if box[i][j] == 1 and box[i][j + 1] == 0:
				(box[i][j], box[i][j + 1]) = (0, 1)
				count += 1
	if count == 0:
		break
for j in range(n):
	c = 0
	for i in range(m):
		c += box[i][j]
	print(c, end=' ')


import sys
n = int(sys.stdin.readline())
cols = sys.stdin.readline().split()
out = []
for c in cols:
	out.append(int(c))
out = sorted(out)
for i in out:
	print(i)
	print(' ')


number_of_columns = int(input())
box_p_column = [int(i) for i in input().split(' ')]
box_p_column = [str(i) for i in sorted(box_p_column)]
print(' '.join(box_p_column).strip())


x = int(input())
y = [int(b) for b in input().split()]
y = sorted(y)
for i in range(x):
	y[i] = str(y[i])
print(' '.join(y))


from sys import stdin

def solve(k, list_):
	list_.sort()
	return list_
question = stdin.readlines()
while len(question) > 1:
	k = int(question.pop(0))
	i_list = list(map(int, question.pop(0).split(' ')))
	final_list = solve(k, i_list)
	for i in final_list:
		print(i, '', end='')
	print('')


n = int(input())
a = sorted(list(map(int, input().split(' '))))
print(' '.join(map(str, a)))


numOfColumns = int(input())
l = sorted(map(int, input().split()))
print(' '.join(map(str, l)))


from sys import stdin

def main():
	input = stdin
	n = input.readline()
	m = input.readline().split()
	m = [int(x) for x in m]
	m.sort()
	m = [str(x) for x in m]
	m = ' '.join(m)
	print(m)
main()


a = int(input())
c = []
ed = input().split()
for i in range(a):
	b = int(ed[i])
	c.append(b)
d = sorted(c)
for j in d:
	print(j, end=' ')


def merge_sort(x):
	if len(x) == 1:
		return x
	left = []
	right = []
	for i in range(0, len(x)):
		if i < len(x) / 2:
			left.append(x[i])
		else:
			right.append(x[i])
	left = merge_sort(left)
	right = merge_sort(right)
	return merge(left, right)

def merge(left, right):
	sol = []
	while len(left) > 0 and len(right) > 0:
		if left[0] <= right[0]:
			sol.append(left[0])
			left = left[1:]
		else:
			sol.append(right[0])
			right = right[1:]
	while len(left) > 0:
		sol.append(left[0])
		left = left[1:]
	while len(right) > 0:
		sol.append(right[0])
		right = right[1:]
	return sol
n = int(input())
sol = ''
string = list(map(int, input().strip().split()))
sort = merge_sort(string)
for i in range(0, len(sort)):
	sol = sol + '{} '.format(sort[i])
print(sol)


import operator as op
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from functools import reduce
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, gcd, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

def inlist():
	return list(map(int, input().split()))

def instr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())

def def_value():
	return 0
n = inp()
a = inlist()
a = sorted(a)
print(*a)


n = int(input())
cols = sorted(list(map(int, input().split())))
cols = map(str, cols)
print(' '.join(cols))


n = int(input())
blocks = input().split()
blocks = [int(i) for i in blocks]
blocks.sort()
for i in blocks:
	print(i, end=' ')


x = input()
list1 = list(map(int, input().split()))
list2 = sorted(list1)
for i in list2:
	print(i, end=' ')


n = int(input())
a = list(map(int, input().split()))
a.sort()
b = ''
for i in range(len(a)):
	b += str(a[i]) + ' '
print(b)


n = int(input())
L = list(map(int, input().split(maxsplit=n)))
print(*sorted(L))


n = int(input())
a = list(map(int, input().split()))
if len(a) == n:
	a.sort()
	for i in a:
		print(i, '', end='')


n = int(input())
a = input().split()
b = [int(i) for i in a]
b.sort()
for x in b:
	print(x, end=' ')


n = int(input())
arr = [int(i) for i in input().split(' ')]
arr.sort()
for i in arr:
	print(i, end=' ')


n = int(input())
colums = [int(x) for x in input().split()]
colums.sort()
flip = [str(x) for x in colums]
print(' '.join(flip))


number_of_columns = int(input())
second_input = input().split()
columns = []
for x in second_input:
	columns.append(int(x))
columns.sort()
string = ''
for x in columns:
	string += str(x) + ' '
print(string)


n = int(input())
lista = input().strip().split(' ')
numeros = []
for i in range(n):
	numeros.append(int(lista[i]))
numeros.sort()
s = ''
for i in numeros:
	s += str(i) + ' '
print(s[:-1])


n = int(input())
line = [int(i) for i in input().split()]
line.sort()
for i in range(n):
	print(line[i], end=' ')


n = int(input())
listOfColumns = list(map(int, input().split()))
sortedList = sorted(listOfColumns)
print(*sortedList)


n = input()
numbers = [int(x) for x in input().split()]
print(' '.join((str(e) for e in sorted(numbers))))


N = int(input())
a = input().split()[:N]
b = [0] * N
for i in range(0, N):
	b[i] = int(a[i])
b.sort()
for i in range(0, N):
	print(int(b[i]), end=' ')


x = input()
y = input()
y = y.split()
y = [int(i) for i in y]
y.sort()
for i in range(len(y)):
	if i == len(y) - 1:
		break
	print(y[i], end=' ')
print(y[len(y) - 1])


import sys
import math
import bisect
import itertools

def main():
	n = int(input())
	A = list(map(int, input().split()))
	A.sort()
	print(' '.join(list((str(a) for a in A))))
main()


def solution(box):
	box.sort()
	return ' '.join((str(e) for e in box))

def main():
	input()
	box_rep = list(map(int, input().split(' ')))
	print(solution(box_rep))
main()


s = int(input())
l = list(map(int, input().split()))
print(*sorted(l))


def main():
	_ = input()
	numbers = map(int, input().split())
	print(' '.join(map(str, sorted(numbers))))
main()


n = int(input())
ip = input().split(' ')
ip = sorted(list(map(int, ip)))
res = ''
for x in range(len(ip)):
	if x == len(ip) - 1:
		res = res + str(ip[x])
	else:
		res = res + str(ip[x]) + ' '
print(res)


j = input()
number = [int(x) for x in input().split()]
number.sort()
number = [str(x) for x in number]
print(' '.join(number))


n = input()
A = list(map(int, input().split()))
A = sorted(A)
for i in range(len(A)):
	A[i] = str(A[i]) + ' '
print(''.join(A))


int(input())
cols = map(int, input().split(' '))
print(*sorted(list(cols)), sep=' ')


t = int(input())
p = list(map(int, input().split()))
for i in range(t):
	for j in range(t - 1):
		if p[j] > p[j + 1]:
			o = p[j]
			p[j] = p[j + 1]
			p[j + 1] = o
for i in range(t):
	print(p[i], end=' ')


n = input()
valores = list(map(int, input().split()))
valores.sort()
for valor in valores:
	print(str(valor), end=' ')


input()
a = list(map(int, input().split()))
b = sorted(a)
print(*b)


n = int(input().strip())
arr = [int(__) for __ in input().strip().split()]
arr.sort()
for x in arr:
	print(x, end=' ')


N = map(int, input().split())
A = sorted(list(map(int, input().split())))
for i in A:
	print(i, end=' ')


n = int(input())
raw_inp = input().split(' ')
a = []
for each in raw_inp:
	a.append(int(each))
a.sort()
for each in a:
	print(each, end=' ')


col = int(input())
data = input()
data = data.split()
data = [int(x) for x in data]
data.sort()
for i in data:
	print(i, end=' ')


from sys import stdin
input()
s = input()
a = (int(v) for v in s.split())
b = sorted(a)
c = (str(v) for v in b)
d = ' '.join(c)
print(d)


n = input()
array = list(map(int, input().split()))
array.sort()
for num in array:
	print(num, end=' ')


def invertBox(box):
	return list(map(list, zip(*box)))
n = int(input())
cols = list(map(int, input().split()))
numRows = max(cols)
box = []
for i in cols:
	column = [1] * i
	column.extend([0] * (numRows - i))
	box.append(column)
box = invertBox(box)
for i in range(len(box)):
	box[i].sort()
box = invertBox(box)
ans = []
for i in box:
	ans.append(i.count(1))
print(*ans)


n = int(input())
a = list(map(int, input().split()))
a.sort()
b = []
for i in a:
	b.append(str(i))
print(' '.join(b))


test = int(input())
block = [int(x) for x in input().split()]
ans = sorted(block)
for x in ans:
	print(x, end=' ')


def main():
	n = int(input())
	box = input().split()
	for i in range(len(box)):
		box[i] = int(box[i])
	box.sort()
	s = ''
	for i in range(n):
		s += str(box[i]) + ' '
	print(s)
main()


n = int(input())
cubs = list(map(int, input().split()))
cubs = sorted(cubs)
print(*cubs)


n = int(input())
a = list(map(int, input().split()))
if len(a) != n:
	raise ValueError
a.sort()
print(*a, sep=' ')


num_cols = input()
boxes = input().split(' ')
boxes = sorted(list(map(int, boxes)))
boxes = ' '.join(list(map(str, boxes)))
print(boxes)


n = int(input())
s = list(map(int, input().split()))
s.sort()
for i in range(n):
	print(s[i])


n = int(input())
cols = list(map(int, input().split()))
print(' '.join((str(c) for c in sorted(cols))))


y = int(input())
x = list(sorted(map(int, input().split())))
print(*x)


n = int(input())
n1 = []
s1 = str()
s = input().split()
for i in range(n):
	n1.append(int(s[i]))
n1.sort()
for i in range(len(n1)):
	if i > 0:
		s1 += ' '
	s1 += str(n1[i])
print(s1)


input()
a = [int(i) for i in input().split()]
a.sort()
for i in a:
	if i != 0:
		print(i, end=' ')
	else:
		print(i)


import sys
n = int(input())
L = list(map(int, input().split()))
L.sort()
for i in L:
	print(i, end=' ')


n = int(input())
mass = [int(s) for s in input().split()]
mass.sort()
for i in range(n):
	print(mass[i], end=' ')


n = int(input())
allNum = input().split()
results = [int(i) for i in allNum]
allNumSorted = sorted(results)
str_nums = [str(x) for x in allNumSorted]
ch = ' '.join(str_nums)
print(ch)


import itertools, math
n = int(input())
l = list(map(int, input().strip().split()))[:n]
a = sorted(l)
print(' '.join(map(str, a)))


_ = input()
print(*tuple((i for i in sorted(map(int, input().split())))))


columns = int(input())
columns_count = []
column_max = 0
for i in input().split():
	columns_count.append(int(i))
for i in range(len(columns_count)):
	if column_max < columns_count[i]:
		column_max = columns_count[i]
columns_total = []
for i in columns_count:
	columns_mass = [0] * column_max
	for j in range(i):
		columns_mass[j] = 1
	columns_total.append(columns_mass)
line_total = []
for i in range(column_max):
	line_mass = [0] * len(columns_total)
	line_number = 0
	for j in columns_total:
		line_mass[line_number] = j[i]
		line_number += 1
	line_mass.sort()
	line_total.append(line_mass)
column_total_back = []
for i in range(len(columns_count)):
	column_sum = 0
	for j in line_total:
		column_sum += j[i]
	column_total_back.append(column_sum)
for i in column_total_back:
	print(i, end=' ')


n = int(input())
a = list(map(int, input().split()))
count = [] * n
for i in a:
	a.sort()
for j in range(len(a)):
	print(a[j], end=' ')


n_cols = int(input())
cubes = list(map(int, input().split()))
for i in range(n_cols):
	minor_index = i
	for j in range(i + 1, n_cols):
		if cubes[minor_index] > cubes[j]:
			minor_index = j
	(cubes[i], cubes[minor_index]) = (cubes[minor_index], cubes[i])
for i in range(n_cols):
	print(cubes[i], end=' ')
print()


n = int(input())
mas = [int(i) for i in input().split()]
mas.sort()
for i in range(len(mas)):
	print(mas[i], end=' ')


numcols = input()
x = input()
x = x.split(' ')
x = list(map(int, x))
x = sorted(x)
print(*x)


n = int(input())
nums = list(map(lambda x: int(x), input().split(' ')))
flag = 0
for i in range(n - 1):
	for j in range(n - i):
		while flag == 0 or j + i < n:
			if nums[i] > nums[i + j]:
				(nums[i], nums[i + j]) = (nums[j + i], nums[i])
				flag = 1
			if j + 1 < n:
				flag = 1
			j += 1
	flag = 0
	j = i
for item in nums:
	print(item, end=' ')


input_s = int(input())
input_l = input().split(' ')
list_l = []
for i in input_l:
	list_l.append(int(i))
for i in range(len(list_l) - 1):
	for j in range(i + 1, len(list_l)):
		if list_l[i] > list_l[j]:
			(list_l[i], list_l[j]) = (list_l[j], list_l[i])
s = ''
for i in range(len(list_l)):
	s += '{} '.format(list_l[i])
print(s.strip())


def f(c):
	return ' '.join((str(i) for i in sorted(c)))
t = int(input())
c = map(int, input().split())
print(f(c))


n = int(input())
x = list(map(int, input().strip().split()))
x.sort()
for i in x:
	print(i, end=' ')


from collections import deque, Counter
import array
from itertools import combinations, permutations
from math import sqrt

def read_int():
	return int(input().strip())

def read_int_array():
	return [int(i) for i in input().strip().split(' ')]
n = read_int()
arr = read_int_array()
arr.sort()
print(' '.join((str(e) for e in arr)))


def main():
	first = input()
	nums = input()
	nums = nums.split(' ')
	nums = [int(n) for n in nums]
	nums.sort()
	print(*nums)
main()


input()
rows = input().split(' ')
for x in range(len(rows)):
	rows[x] = int(rows[x])
rows.sort()
for i in rows:
	print(i)


n = int(input())
s = list(map(int, input().split()))
s.sort()
for el in s:
	print(el, end=' ')


from sys import stdin

def quick(n):
	cont = 0
	if len(n) == 0:
		return n
	else:
		piv = n[len(n) // 2]
		maxi = []
		mini = []
		med = []
		for i in range(len(n)):
			cont = cont + 1
			if n[i] < piv:
				mini.append(n[i])
			elif n[i] > piv:
				maxi.append(n[i])
			elif n[i] == piv:
				med.append(n[i])
	return quick(mini) + med + quick(maxi)

def main():
	entr = int(stdin.readline().strip())
	entra1 = [int(x) for x in stdin.readline().strip().split()]
	a = quick(entra1)
	for i in range(len(a)):
		print(a[i], end=' ')
main()


from sys import stdin, stdout
input = stdin.readline

def write(n, sep='\n'):
	stdout.write(str(n))
	stdout.write(sep)

def gil():
	return list(map(int, input().split()))
n = gil()
lis = gil()
lis.sort()
print(' '.join(map(str, lis)))


n = int(input())
list = [int(i) for i in input().split()]
list.sort()
b = [str(i) for i in list]
print(' '.join(b))


n = int(input())
ai = list(map(int, input().split()))
ai.sort()
print(*ai)


count = input()
nums = input().split()
nums = list(map(int, nums))
for i in range(len(nums) - 1, -1, -1):
	if i < len(nums) - 1:
		if nums[i] > nums[i + 1]:
			temp = i
			while temp < len(nums) - 1 and nums[temp] > nums[temp + 1]:
				diff = nums[temp] - nums[temp + 1]
				nums[temp] -= diff
				nums[temp + 1] += diff
				temp += 1
nums = list(map(str, nums))
print(*nums)


n = input()
a = input().split(' ')
res = []
for i in a:
	res.append(int(i))
res.sort()
for r in res:
	print(r, end=' ')


numColumns = int(input().strip())
grid = [[0 for x in range(numColumns)] for y in range(101)]
nums = [int(x) for x in input().strip().split(' ')]
for i in range(len(nums)):
	numObjects = nums[i]
	for ind in range(numObjects):
		grid[ind][i] = 1
for row in range(101):
	column = numColumns - 1
	while column >= 0:
		if grid[row][column] == 1:
			tempCol = column
			while tempCol + 1 < numColumns and grid[row][tempCol + 1] == 0:
				grid[row][tempCol] = 0
				grid[row][tempCol + 1] = 1
				tempCol += 1
		column -= 1
sums = [0] * numColumns
for j in range(numColumns):
	for i in range(101):
		if grid[i][j] == 0:
			break
		else:
			sums[j] += 1
ans = ''
for x in sums:
	ans += str(x) + ' '
print(ans)


n = int(input())
array = list(map(int, input().split()[:n]))
array.sort()
for x in range(n):
	print(array[x], end=' ')


from sys import stdin
a = stdin.readline()
b = stdin.readline()
c = b.split()
for i in range(0, int(a)):
	c[i] = int(c[i])
c.sort()
for i in range(0, int(a)):
	c[i] = str(c[i])
e = ' '.join(c)
print(e)


n = int(input())
a = [int(x) for x in input().split()]

def solution(n, a):
	for j in range(1, n):
		key = a[j]
		i = j - 1
		while i >= 0 and a[i] > key:
			a[i + 1] = a[i]
			i = i - 1
		a[i + 1] = key
	return a
print(*solution(n, a))


n = int(input())
a = list(map(int, input().split()))
a.sort()
print(*a, sep=' ')


col = int(input())
h = [int(x) for x in input().split()]
ncount = [0] * max(h)
res = [0] * col
for i in range(max(h)):
	for j in h:
		if j >= i + 1:
			ncount[i] += 1
for k in ncount:
	for o in range(k):
		res[-o - 1] += 1
for m in res:
	print(m, end=' ')


n = int(input())
s = ''
a = [int(n) for n in input().split(' ')]
a = sorted(a)
for i in range(n):
	s += str(a[i]) + ' '
print(s[:-1])


n = int(input().strip())
l = list(map(int, input().strip().split()))
while True:
	flag = 0
	for i in range(1, n):
		if l[i - 1] > l[i]:
			flag = 1
			(l[i], l[i - 1]) = (l[i] + (l[i - 1] - l[i]), l[i - 1] - (l[i - 1] - l[i]))
	if flag == 0:
		break
print(*l)


n = int(input())
v = input().split()
a = []
for el in v:
	a.append(int(el))
frecv = [0] * 101
for el in a:
	frecv[el] += 1
for i in range(1, 101):
	for j in range(frecv[i]):
		print(i, end=' ')


n = int(input())
lst = [int(x) for x in input().split()]
for i in sorted(lst):
	print(i, end=' ')


n = int(input())
data = input()
lst = list()
for i in data.split():
	lst.append(int(i))
lst.sort()
for j in lst:
	print(j, end=' ')


input()
for i in sorted(list(map(int, input().split()))):
	print(str(i), end=' ')


num_column = int(input())
line = [int(i) for i in input().split()]
line = sorted(line)
A = []
for i in range(num_column):
	line[i] = str(line[i])
	A.append(line[i])
print(' '.join(A))


n = int(input())
t = list(map(int, input().split()))
t.sort()
s = ''
for i in range(len(t)):
	s = s + ' ' + str(t[i])
s = s[1:]
print(s)


cols_num = input()
cols = sorted(input().split(' '), key=int)
print(' '.join(cols))


n = input()
set = input()
set = set.split(' ')
set = [int(num) for num in set]
set.sort()
set = [str(num) for num in set]
res = ''
for num in set:
	res += num + ' '
print(res[0:-1])


n = int(input())
cube_cols = sorted(list(map(lambda x: int(x), input().split())))
print(' '.join((str(c) for c in cube_cols)))


n = int(input())
c = list(map(int, input().split()))
s = str(sorted(c))
s = s.replace(', ', ' ')
s = s.replace('[', '')
s = s.replace(']', '')
print(s)


n = int(input())
lst = list(map(int, input().split()))
print(' '.join(list(map(str, sorted(lst)))))


n = int(input())
list_of_coins = list(map(int, input().split(' ')))
list_of_coins.sort()
for i in list_of_coins:
	print('{}'.format(i), end=' ')


n = int(input())
a = list(map(int, input().split()))
x = []
temp = 0
for i in a:
	x.append(i)
for i in range(len(x)):
	for j in range(i + 1, len(x)):
		if x[i] > x[j]:
			temp = x[i]
			x[i] = x[j]
			x[j] = temp
for i in range(len(x)):
	print(x[i], end=' ')


n = int(input())
a = [int(x) for x in input().split()]
a.sort()
print(*a, sep=' ')


n = int(input())
lst = [int(x) for x in input().split()]
for i in range(n - 1):
	for j in range(n - 1 - i):
		if lst[j] > lst[j + 1]:
			(lst[j], lst[j + 1]) = (lst[j + 1], lst[j])
[print(x, end=' ') for x in lst]


num = int(input())
list = input()
lista = [int(n) for n in list.split()]
lista.sort()
string = ''.join((f'{n} ' for n in lista))
print(string)


import sys
num_cols = sys.stdin.readline()
lst = sys.stdin.readline().split()
num_list = []
for a in lst:
	num_list.append(int(a))
num_list = sorted(num_list)
ans = ''
for item in num_list:
	ans += str(item) + ' '
print(ans)


columnas = input()
forma = input()
forma = forma.split(' ')
forma2 = list()
for x in forma:
	forma2.append(int(x))
forma2.sort()
print(' '.join((str(x) for x in forma2)))


num = input()
nums = sorted(input().split(), key=lambda x: int(x))
print(' '.join(nums))


from sys import stdin, stdout
cubes = []
n = 0
for line in stdin.readlines():
	if n == 0:
		n = int(line)
	else:
		cubes = line.strip().split(' ')
cubes = sorted([int(value) for value in cubes])
stdout.writelines(['%s ' % value for value in cubes])


n = int(input())
l = list(map(int, input().split()))[:n]
l.sort()
s = ''
s = s + str(l[0])
for i in range(1, len(l)):
	s = s + ' ' + str(l[i])
print(s)


n = int(input())
line = list(input().split(' '))
a = [int(i) for i in line]
a.sort()
b = [str(i) + ' ' for i in a]
c = len(b)
b[c - 1] = str(a[c - 1])
H = ''.join(b)
print(H)


input()
cs = list(map(int, input().split(' ')))
cs.sort()
print(' '.join([str(c) for c in cs]))


n = int(input())
list = list(map(int, input().split()))
list.sort()
for t in range(n):
	print(list[t], end=' ')


n = int(input())
l = [int(i) for i in input().split()]
l.sort()
s = map(str, l)
print(' '.join(s))


N = int(input())
L = []
L = input().split()
for k in range(N):
	L[k] = int(L[k])
R = ''
while len(L) > 0:
	T = min(L)
	R += str(T) + ' '
	L.remove(T)
Y = len(R) - 1
print(R[:Y])


n = int(input())
l = list(map(int, input().split()))
x = sorted(l)
for i in range(len(x)):
	print(x[i], end=' ')


n = int(input())
inp = input().split(' ')
a = list(map(int, inp))
a.sort()
out = ''
for i in a:
	out += str(i) + ' '
print(out)


import sys
i = 0
heights = ''
for line in sys.stdin:
	if i == 1:
		heights = line.strip()
	i += 1
heights = heights.split(' ')
for i in range(len(heights)):
	heights[i] = int(heights[i])
heights.sort()
ans = ''
for i in range(len(heights)):
	ans += str(heights[i]) + ' '
print(ans[:-1])


n = int(input())
m = list(map(int, input().split()))
m.sort()
print(' '.join([str(x) for x in m]))


import sys
n = sys.stdin.readline()
numbers = sys.stdin.readline().split(' ')
numbers = list(map(int, numbers))
numbers = sorted(numbers)
for i in numbers:
	print(i, end=' ')


n = input()
conf = [int(x) for x in input().split()]
conf.sort()
output = ''
for i in range(len(conf) - 1):
	output = output + str(conf[i]) + ' '
output = output + str(conf[len(conf) - 1])
print(output)


def main():
	arr = []
	n = int(input())
	arr.extend([int(x) for x in input().split()])
	arr.sort()
	output = ''
	for i in range(len(arr) - 1):
		output += str(arr[i]) + ' '
	output += str(arr[-1])
	print(output)
main()


for i in range(1):
	t = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	for j in arr:
		print(j, end=' ')


n = int(input())
a = list(map(int, input().split()))
b = list(sorted(a))
print(*b, sep=' ')


n = int(input())
l = list(map(int, input().split()))
i = 0
while i < len(l) - 1:
	if l[i] > l[i + 1]:
		t = l[i + 1]
		l[i + 1] += l[i] - l[i + 1]
		l[i] -= l[i] - t
		i = 0
	else:
		i += 1
for i in l:
	print(i, end=' ')


n = int(input())
x = list(map(int, input().split()))
print(*sorted(x))


n = int(input())
a = [int(i) for i in input().split()]
a.sort()
print(' '.join((str(e) for e in a)))


n1 = int(input())
n2 = input().split()
resultado = [int(i) for i in n2]
resultado.sort()
print(*resultado)


n = int(input())
mas = list(map(int, input().split(' ')))
mas.sort()
res = list(map(str, mas))
print(' '.join(res))


import math
n = int(input())
n = int(n)
a = input().split()
for i in range(n):
	a[i] = int(a[i])
a.sort()
for i in a:
	print(i, end=' ')


import re
(zr, nn) = '0 1'.split()

def tr(s):
	ln = len(re.findall('1', s))
	return (len(s) - ln) * zr + ln * nn

def ch(n, v):
	for x in v:
		yield tr(x)

def tsv(n, v):
	m = max(v)
	hv = []
	for x in v:
		hv.append((m - x) * zr + x * nn)
	vv = []
	for x in range(m - 1, -1, -1):
		s = ''
		for h in range(n):
			s += hv[h][x]
		vv.append(s)
	return (m, vv)

def tnv(n, m, v):
	for xn in range(n):
		s = ''
		for xm in range(m):
			s += v[xm][xn]
		yield len(re.findall('1', s))
n = int(input())
v = [int(x) for x in input().split()]
(m, vv) = tsv(n, v)
for x in tnv(n, m, list(ch(n, vv))):
	print(x, end=' ')


a = input()
s = list(map(int, input().split()))
s.sort()
print(*s)


n = int(input())
ru = [int(x) for x in input().split()]
text = 0
for i in range(n - 1):
	if ru[i + 1] >= ru[i]:
		text += 0
	else:
		text += 1
if text == 0:
	print(' '.join(map(str, ru)))
else:
	ru.sort()
	print(' '.join(map(str, ru)))


m = int(input())
n = [int(x) for x in input().split()]
n.sort()
for i in n:
	if i <= m:
		print(i, end=' ')
	else:
		print(i)


stlpcov = int(input())
stlpce1 = list(map(int, input().split()))
stlpce2 = sorted(stlpce1)
print(' '.join(map(str, stlpce2)))


n = int(input())
l = [int(x) for x in input().split()]
out = []
for i in range(0, n):
	d = min(l)
	out.append(d)
	l.remove(d)
print(' '.join([str(x) for x in out]))


n = int(input())
li = [int(x) for x in input().split()]
li.sort()
for ele in li:
	print(ele, end=' ')


from sys import stdin

def qsort(l):
	if l:
		(head, *tail) = l
		return qsort([x for x in tail if x <= head]) + [head] + qsort([x for x in tail if x > head])
	return []

def main():
	r = stdin
	r.readline()
	b = list(map(lambda x: int(x), r.readline().split(' ')))
	b = map(lambda x: str(x), qsort(b))
	print(' '.join(b))
main()


input()
n = input().split()
n = [int(i) for i in n]
n.sort()
printing = ''
for i in n:
	printing = printing + str(i) + ' '
print(printing)


_ = input()
print(*sorted([int(x) for x in input().strip().split()]), sep=' ')


(a, b) = (int(input()), list(map(int, input().split())))
b.sort()
print(' '.join(map(str, b)))


n = input()
numbers = list(map(int, input().split(' ')))
print(' '.join(map(str, sorted(numbers))))


import sys
input = sys.stdin.readline

def int_array():
	return list(map(int, input().split()))
n = input()
a = int_array()
a.sort()
for i in range(len(a)):
	print(a[i], end=' ')


def solve():
	x = int(input())
	arr = input().split(' ')
	return sorted(arr, key=lambda x: int(x))
res = solve()
for x in res:
	print(x, end=' ')


columNum = eval(input())
sumbyColum = [eval(i) for i in input().split()]
rowNum = max(sumbyColum)
cubePic = []
for i in range(rowNum):
	cubePic.append([])
for i in range(rowNum):
	for j in range(columNum):
		cubePic[i].append(0)
for i in range(columNum):
	for j in range(sumbyColum[i]):
		cubePic[rowNum - 1 - j][i] = 1
for i in range(rowNum):
	cubePic[i] = sorted(cubePic[i])
for i in range(columNum):
	count = 0
	for j in range(rowNum):
		count += cubePic[j][i]
	print(count, end=' ')


n = int(input())
a = []
s = input()
r1 = s.split(' ')
for i in range(n):
	t = int(r1[i])
	a.append(t)
a.sort()
for i in range(len(a)):
	print(a[i], end=' ')


while True:
	try:
		n = int(input())
		L_old = list(map(int, input().split(' ')))
		L_new = list(set(L_old))
		L_new.sort()
		result = []
		for j in L_new:
			fre = L_old.count(j)
			while fre > 0:
				fre -= 1
				result.append(j)
		for k in result:
			print(k, end=' ')
	except EOFError:
		break


n = int(input())
ls = map(str, sorted(list(map(int, input().split()))))
print(' '.join(ls))


n = int(input())
a = list(map(int, input().split()))
a.sort()
ans = ''
for x in a:
	ans += str(x) + ' '
print(ans)


n = int(input())
a = [int(x) for x in input().split()]
rcount = [0] * 101
for ai in a:
	for r in range(ai):
		rcount[r] += 1
ccount = [0] * n
for r in range(100):
	for j in range(rcount[r]):
		ccount[n - 1 - j] += 1
for c in ccount:
	print(c, end=' ')


n = int(input())
s = sorted(map(int, input().split()))
sr = ''
for i in range(len(s)):
	sr += str(s[i]) + ' '
print(sr)


n = int(input())
a = input()
a = a.split()
i = 0
while i < n:
	a[i] = int(a[i])
	i += 1
i = 0
while i < n:
	i += 1
	j = 0
	while j < n - 1:
		if a[j] > a[j + 1]:
			(a[j], a[j + 1]) = (a[j + 1], a[j])
		j += 1
i = 0
while i < n:
	print(a[i], end=' ')
	i += 1


input()
A = list(map(int, input().split()))
A.sort()
for a in A:
	print(a, end=' ')


columns = int(input())
boxesString = input().split()
boxes = []
gravityBoxes = []
for i in range(columns):
	boxes.append(int(boxesString[i]))
repeat = columns
while repeat > 0:
	counter = columns - 1
	while counter > 0:
		if boxes[counter - 1] <= boxes[counter]:
			counter -= 1
			continue
		else:
			pulledBox = boxes[counter - 1] - boxes[counter]
			boxes[counter - 1] = boxes[counter]
			boxes[counter] = pulledBox + boxes[counter]
			counter -= 1
	repeat -= 1
boxes = [str(i) for i in boxes]
print(' '.join(boxes))


columns = int(input())
cubes = [int(x) for x in input().split()]
change = True
while change:
	change = False
	for i in range(columns):
		if i + 1 != columns:
			if cubes[i] > cubes[i + 1]:
				placeholder = cubes[i]
				cubes[i] -= cubes[i] - cubes[i + 1]
				cubes[i + 1] += placeholder - cubes[i + 1]
				change = True
print(' '.join([str(x) for x in cubes]))


n = input()
a = sorted(input().split(), key=int)
print(' '.join(a))


n = input()
lst = sorted(map(int, input().split()))
print(*lst)


m = int(input())
d = input()
b = ''
f = len(d)
k = 0
c = []
for i in range(f):
	if d[i] != ' ':
		b = b + d[i]
		if i == f - 1:
			c.append(int(b))
	elif b != '':
		c.append(int(b))
		b = ''
c.sort()
for i in range(len(c)):
	print(c[i], end=' ')


from sys import stdin
for s in stdin:
	s = input()
	a = [int(v) for v in s.split()]
	a.sort()
	for v in a:
		print(v, end=' ')
	print()


a = int(input())
b = input()
l = b.split()
lis = list(sorted(map(int, l)))
s = ''
for i in lis:
	s += str(i) + ' '
print(s)


from sys import stdin, stdout
n = int(stdin.readline())
arr = [int(x) for x in stdin.readline().split()]
arr.sort()
s = ''
for k in arr:
	s += str(k) + ' '
print(s)


n = int(input())
a = list(map(int, input().split(' ')))
count = 0
for i in range(n - 1, 0, -1):
	for j in range(i - 1, -1, -1):
		count = a[j] - a[i]
		if count > 0:
			a[j] -= count
			a[i] += count
			count = 0
for item in a:
	print(item, end=' ')


n = int(input())
a = list(map(int, input().rstrip().split()))
a.sort()
for i in range(n):
	print(a[i], end=' ')


_ = input()
a = [int(x) for x in input().split(' ')]
a.sort()
output = ''
for item in a:
	output += str(item) + ' '
print(output[:-1])


n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=False)
print(*a)


input()
box = [int(x) for x in input().split(' ')]
print(*sorted(box), sep=' ')


n = int(input())
li = list(input().split(' '))
res = sorted(li, key=int)
for i in res:
	print(i, end=' ')


import sys

def gravity_flip_solver(num_of_columns, box_numbers_list):
	assert len(box_numbers_list) == num_of_columns
	box_numbers_list = sorted(box_numbers_list)
	output_str = ''
	for number in box_numbers_list:
		output_str += str(number) + ' '
	return output_str

def main():
	num_of_columns = int(str(sys.stdin.readline()))
	box_numbers_list = [int(i) for i in str(sys.stdin.readline()).split(' ')]
	print(gravity_flip_solver(num_of_columns, box_numbers_list))
main()


n = int(input())
ar = list(map(int, input().split()))
ar.sort()
print(*ar, sep=' ')


n = int(input())
columnHeights = list(map(int, input().split(' ')))
print(' '.join((str(columnHeight) for columnHeight in sorted(columnHeights))))


n = int(input())
line = [int(i) for i in input().split()]
line.sort()
output = []
for i in line:
	output.append(str(i))
print(' '.join(output))


n = int(input())
cols = sorted(map(int, input().split()))
for i in cols:
	print(i, end=' ')


n = int(input())
c = input().split()
c = list(map(int, c))
c = sorted(c)
c = list(map(str, c))
print(' '.join(c))


n = input()
l = list(map(int, input().split()))
l.sort()
print(*l)


n = int(input())
col = [int(x) for x in input().split()]
colChange = sorted(col)
for x in colChange:
	print(x, end=' ')


n = int(input())
data = list(map(int, input().split()))
data.sort()
print(*data)


n = int(input())
st = input()
lst = st.split()
lst1 = ''
for i in range(0, len(lst)):
	lst[i] = int(lst[i])
lst = sorted(lst)
for i in range(0, len(lst)):
	lst1 = lst1 + str(lst[i]) + ' '
print(lst1)


no_column = int(input())
square = input().split()
lists = list()
for x in square:
	lists.append(int(x))
lists.sort()
print(' '.join((str(p) for p in lists)))


def func(arr, n):
	arr = sorted(arr)
	for ele in arr:
		print(ele, end=' ')
n = int(input())
arr = list(map(int, input().split()))
func(arr, n)


numberOfColumns = int(input())
configuration = [int(ip) for ip in input().split()]
sortedConfiguration = sorted(configuration)
stringConf = [str(ip) for ip in sortedConfiguration]
print(' '.join(stringConf))


col_count = int(input())
cubes_per_col = list(map(int, input().split(' ')))
col_height = max(cubes_per_col)
cube = []
for cube_count in cubes_per_col:
	col = [0] * (col_height - cube_count) + [1] * cube_count
	cube.append(col)
while True:
	moves = 0
	for x in range(col_count - 1):
		for y in range(col_height):
			if cube[x][y] == 1 and cube[x + 1][y] == 0:
				cube[x][y] = 0
				cube[x + 1][y] = 1
				moves += 1
	if moves == 0:
		break
print(' '.join(map(str, map(sum, cube))))


n = int(input())
st = input().split(' ')
a = [int(i) for i in st]
for i in range(n):
	for j in range(n):
		if a[i] < a[j]:
			temp = a[i]
			a[i] = a[j]
			a[j] = temp
for i in a:
	print(i, end=' ')


n = int(input())
box = list(map(int, input().split()))
box.sort()
print(*box, sep=' ')


n = int(input())
ar = list(map(int, input().split()))
ar = sorted(ar)
print(' '.join(map(str, ar)))


n = int(input())
a = [int(x) for x in input().split()]
zong = []
for i in range(1, max(a) + 1):
	c = 0
	for j in range(n):
		if a[j] >= i:
			c += 1
	zong.append(c)
zong2 = []
for k in range(1, n + 1):
	b = 0
	for l in range(max(a)):
		if k <= zong[l]:
			b += 1
	zong2.append(b)
zong2.sort()
for m in range(n):
	print(zong2[m], end=' ')


n = int(input())
a = input().split(' ')
for i in range(n):
	a[i] = int(a[i])
a.sort()
for i in range(n):
	print(a[i])


class Solution(object):

	def __init__(self):
		self.answer = []
		self.cols = int(input())
		self.a = list(map(int, input().split()))
		self.rows = max(self.a)
		self.matrix = [0] * (self.rows * self.cols)
		for i in range(self.cols):
			for j in range(self.rows - 1, -1, -1):
				index = j * self.cols + i
				if self.a[i]:
					self.matrix[index] = 1
					self.a[i] -= 1
				else:
					break
		self.solve()
		self.create_answer()
		self.print_answer()
	pass

	def debug(self, msg):
		print(msg)
		for i in range(self.rows):
			for j in range(self.cols):
				index = i * self.cols + j
				print(self.matrix[index], end=' ')
			print()
		pass

	def solve(self):
		for i in range(self.rows - 1, -1, -1):
			a = []
			for j in range(self.cols - 1, -1, -1):
				index = i * self.cols + j
				if self.matrix[index] == 0:
					a.append(index)
				elif len(a) == 0:
					continue
				else:
					self.matrix[a.pop(0)] = 1
					a.append(index)
					self.matrix[index] = 0
		pass

	def create_answer(self):
		for i in range(self.cols):
			a = 0
			for j in range(self.rows):
				index = j * self.cols + i
				if self.matrix[index]:
					a += 1
			self.answer.append(a)
		pass

	def print_answer(self):
		for x in self.answer:
			print(x, end=' ')
		pass

def main():
	Solution()
	pass
main()


xyz = []

def input1():
	global xyz
	if len(xyz) == 0:
		xyz = [i for i in input().split()]
		xyz = xyz[::-1]
	v = xyz[-1]
	del xyz[-1]
	return v
n = int(input())
z = []
for y in range(n):
	P = int(input1())
	z.append(P)
list.sort(z)
for P in z:
	print(P, end=' ')


def gravity():
	n = int(input())
	blocks = input().split(' ')
	quicksort(blocks, 0, n - 1)
	outputString = ''
	for i in range(n):
		outputString += blocks[i] + ' '
	outputString = outputString[:len(outputString) - 1]
	print(outputString)

def quicksort(A, lo, hi):
	if lo < hi:
		p = partition(A, lo, hi)
		quicksort(A, lo, p - 1)
		quicksort(A, p + 1, hi)

def partition(A, lo, hi):
	pivot = int(A[hi])
	i = lo - 1
	for j in range(lo, hi):
		if int(A[j]) <= pivot:
			i = i + 1
			(A[i], A[j]) = (A[j], A[i])
	(A[i + 1], A[hi]) = (A[hi], A[i + 1])
	return i + 1
gravity()


n = int(input())
a = list(map(int, input().split()))
b = [0] * 101
c = [0] * n
for i in a:
	for j in range(i):
		b[j] += 1
for i in range(n - 1, -1, -1):
	r = 0
	for j in range(101):
		r += b[j] > 0
		b[j] -= 1
	c[i] = str(r)
print(' '.join(c))


input()
cubes = list(map(int, input().split()))
for i in range(len(cubes) - 2, -1, -1):
	for j in range(len(cubes) - 1, i, -1):
		if cubes[i] > cubes[j]:
			d = cubes[i] - cubes[j]
			(cubes[i], cubes[j]) = (cubes[i] - d, cubes[j] + d)
for i in cubes:
	print(i, end=' ')


input()
columns = [int(i) for i in input().split(' ')]
while True:
	left = columns[0]
	failed = False
	for i in range(1, len(columns), 1):
		if columns[i] < left:
			move = left - columns[i]
			columns[i] += move
			columns[i - 1] -= move
			failed = True
		left = columns[i]
	if not failed:
		break
print(' '.join([str(i) for i in columns]))


import sys
from random import choice, randint
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

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

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

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines().strip()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().strip().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().strip().split()]

def LS():
	return sys.stdin.readline().strip().split()

def I():
	return int(sys.stdin.readline().strip())

def F():
	return float(sys.stdin.readline().strip())

def S():
	return sys.stdin.readline().strip()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))
inp = sys.stdin.readline
out = sys.stdout.write

def main():
	n = I()
	a = LI()
	a.sort()
	print(*a)
main()


_ = int(input())
entry = sorted(list(map(int, input().split())))
entry = map(str, entry)
print(' '.join(entry))


n = int(input())
lst = list(map(int, input().split()))
for i in range(n):
	for j in range(i, 0, -1):
		if lst[j] < lst[j - 1]:
			(lst[j], lst[j - 1]) = (lst[j - 1], lst[j])
print(*lst)


n = int(input())
s = [int(x) for x in input().split()]
s.sort()
for i in s:
	print(i, end=' ')


input()
print(' '.join((str(n) for n in sorted(map(int, input().split(' '))))))


import sys
num_cols = sys.stdin.readline()
cols = sys.stdin.readline()
col_list = list()
for i in cols.split():
	col_list.append(i)
col_list.sort(key=int)
result = ' '.join(col_list)
print(result)


from sys import stdin, stdout
n = int(stdin.readline())
cols = [int(x) for x in stdin.readline().rstrip().split()]
cols.sort()
cols = [str(x) for x in cols]
res = ' '.join(cols)
stdout.write(res + '\n')


n = input()
column = [int(i) for i in input().split()]
column = sorted(column)
for i in column:
	print(i, end=' ')


import sys
n_nums = input()
n = input()
n = n.split()
n = [int(i) for i in n]
n = sorted(n)
n = map(str, n)
print(' '.join(n))


n = int(input())
column = [int(x) for x in input().split()]
column.sort()
print(' '.join((str(x) for x in column)))


def integerize(arr):
	for i in range(len(arr)):
		arr[i] = int(arr[i])
	return arr
n = int(input())
values = input().split()
values = integerize(values)
flip_finished = False
while not flip_finished:
	i = 0
	flip_finished = True
	while i < n - 1:
		diff = values[i] - values[i + 1]
		if diff <= 0:
			i += 1
			continue
		values[i] -= diff
		values[i + 1] += diff
		flip_finished = False
		i += 1
for value in values:
	print(value, end=' ')


n = int(input())
list_ = sorted(list(map(int, input().split())))
for val in list_:
	print(val, end=' ')


n = int(input())
m = input().split()
m = [int(i) for i in m]
m = sorted(m)
if n == 0:
	print('')
else:
	line = ''
	for i in range(len(m)):
		line = line + ' ' + str(m[i])
	print(line.strip())


number = int(input())
columns = input().split()
for i in range(len(columns)):
	columns[i] = int(columns[i])
columns.sort()
for i in columns:
	print(i, end=' ')


n = int(input())
a = list(map(int, input().split()))
for i in reversed(range(n)):
	for j in reversed(range(i)):
		if a[i] < a[j]:
			x = a[j] - a[i]
			a[i] = a[i] + x
			a[j] = a[j] - x
s = ''
for i in range(n):
	s = s + str(a[i]) + ' '
print(s)


n = int(input())
list1 = []
pieces = input().split()
for i in range(n):
	list1.append(int(pieces[i]))
list1.sort()
a = '%d' % list1[0]
for i in range(1, n):
	a = a + ' ' + '%d' % list1[i]
print(a)


import sys
inp = sys.stdin.readline()
inp = sys.stdin.readline()
inp = inp.strip('\n')
inp = inp.split(' ')
for i in range(len(inp)):
	inp[i] = int(inp[i])
inp.sort()
for stack in inp:
	print(stack)


n = int(input())
inp = input().split()
arr = list()
for i in range(len(inp)):
	arr.append(int(inp[i]))
arr.sort()
for i in range(len(arr)):
	print(arr[i], end=' ')


input()
num = list(map(int, input().split()))
num.sort()
print(*num)


n = int(input())
data = [int(x) for x in input().split(' ')]
data.sort()
for i in range(len(data)):
	print(data[i], end=' ')


n = int(input())
cubes = sorted([int(i) for i in input().split()])
print(*cubes)


x = int(input())
s = input().split()
s = list(map(int, s))
s.sort()
print(*s)


N = int(input())
a = list(map(int, input().split()))
a = sorted(a)
print(*a, sep=' ')


x = int(input())
to_be_sorted = [int(z) for z in input().split()]
to_be_sorted.sort()
print(' '.join((str(x) for x in to_be_sorted)))


n = int(input())
cubos = [int(x) for x in input().split()]
cubos = sorted(cubos)
for i in range(len(cubos) - 1):
	print(cubos[i], end=' ')
print(cubos[len(cubos) - 1])


n = int(input())
cols = [int(x) for x in input().split()]
for x in range(n):
	for c in reversed(range(x, n)):
		if cols[c] < cols[x]:
			delta = cols[x] - cols[c]
			cols[x] -= delta
			cols[c] += delta
print(' '.join([str(x) for x in cols]))


columns = int(input())
amount_of_cubes = input().split(' ')
for i in range(len(amount_of_cubes)):
	amount_of_cubes[i] = int(amount_of_cubes[i])
amount_of_cubes.sort()
for j in range(len(amount_of_cubes)):
	amount_of_cubes[j] = str(amount_of_cubes[j])
print(' '.join(amount_of_cubes))


n = eval(input())
a = sorted((int(x) for x in input().split(' ')))
for x in a:
	print(x, end=' ')


x = int(input())
arr = [int(i) for i in input().split()]
arr.sort()
for i in arr:
	print(i, end=' ')


def Merge(a, lo, hi):
	temp = []
	k = 0
	m = (lo + hi) // 2
	p1 = lo
	p2 = m + 1
	while p1 <= m and p2 <= hi:
		if a[p1] > a[p2]:
			temp.append(a[p2])
			p2 = p2 + 1
		else:
			temp.append(a[p1])
			p1 = p1 + 1
		k = k + 1
	while p1 <= m:
		temp.append(a[p1])
		p1 = p1 + 1
		k = k + 1
	while p2 <= hi:
		temp.append(a[p2])
		p2 = p2 + 1
		k = k + 1
	for i in range(k):
		a[lo + i] = temp[i]
	return a

def MS(a, lo, hi):
	if lo == hi:
		return
	m = (lo + hi) // 2
	MS(a, lo, m)
	MS(a, m + 1, hi)
	Merge(a, lo, hi)
	return a
n = int(input())
a = list(map(int, input().split()))
if n > 1:
	a = MS(a, 0, n - 1)
	print(' '.join(list(map(str, a))))
else:
	print(a[0])


e = int(input())
a = input().split()
s = ''
x = []
for i in range(e):
	x.append(int(a[i]))
x = sorted(x)
for i in x:
	s = s + str(i) + ' '
print(s)


n = int(input())
arr = [int(s) for s in input().split()]
arr.sort()
for x in arr:
	print(x, end=' ')
print()


def sort(arr):
	for i in range(1, len(arr)):
		key = arr[i]
		j = i - 1
		while j >= 0 and arr[j] > key:
			arr[j + 1] = arr[j]
			j -= 1
		arr[j + 1] = key
n = int(input())
arr = list(map(int, input().split()))
sort(arr)
for i in range(n):
	print(arr[i], end=' ')


n = int(input())
arr = list(map(int, input().rstrip().split()))
arr.sort()
print(*arr)


n = int(input())
data = list(map(int, input().split()))
print(' '.join(list(map(str, sorted(data)))))


n = int(input())
a = input().split()
l = []
for i in range(n):
	l.append(int(a[i]))
l.sort()
for i in l:
	print(i, end=' ')


n = int(input())
val = [int(x) for x in input().split()]
val.sort()
print(*val)


def solution(box, n):
	return ' '.join(map(str, sorted(box)))
n = int(input())
box = list(map(int, input().split()))
print(solution(box, n))


n = int(input())
l = list(map(int, input().split()))
m = max(l)
for i in range(len(l)):
	if l[i] == 0:
		l[i] = 1
		l[i + 1] = l[i + 1] - 1
r = sorted(l)
for i in r:
	print(i, end=' ')


n = int(input())
a = [int(i) for i in input().split()]
res = [str(i) for i in sorted(a)]
print(' '.join(res))


n = int(input())
a = input().split()
l = []
d = []
for i in a:
	l.append(int(i))
for i in sorted(l):
	d.append(str(i))
print(' '.join(d))


a = int(input())
s = input().split()
for i in range(a):
	s[i] = int(s[i])
s = sorted(s)
for i in s:
	print(i, end=' ')


n = int(input())
line = input()
lis = line.split()
li = list()
for i in range(n):
	a = int(lis[i])
	li.append(a)
li.sort()
for i in range(n - 1):
	print(li[i], end=' ')
print(li[n - 1])


n = int(input())
cubes = [int(x) for x in input().split()]
cubes.sort()
cubes = [str(x) for x in cubes]
print(' '.join(cubes))


from sys import stdin

def main():
	(_,) = stdin_get_ints_from_line()
	columns = stdin_get_ints_list_from_line()
	columns.sort()
	print(' '.join((str(x) for x in columns)))

def stdin_get_ints_from_line():
	return (int(x) for x in stdin.readline().strip().split(' '))

def stdin_get_ints_list_from_line() -> list:
	return list((int(x) for x in stdin.readline().strip().split(' ')))

def stdin_get_string_from_line():
	return stdin.readline().strip()
main()


n = int(input())
lista = list(map(lambda x: int(x), input().strip().split(' ')))
lista.sort()
lista = list(map(lambda x: str(x), lista))
print(' '.join(lista))


ul = input()
a = [int(u) for u in input().split()]
a.sort()
for u in a:
	print(u, end=' ')


n = int(input())
blocks = list(map(int, input().split(' ')))[:n]
blocks.sort(reverse=False)
print(*blocks, sep=' ')


s = int(input())
k = [int(x) for x in input().split()]
l = []
for i in range(s):
	l.append(k[i])
o = sorted(l)
b = [str(f) for f in o]
print(' '.join(b))


t = int(input())
l = list(map(int, input().split()))
l.sort()
print(*l)


x = int(input(''))
y = input('')
z = y.split(' ')
z = [int(a) for a in z]
z.sort()
a = 0
r = ''
while a < x:
	r += ' ' + str(z[a])
	a += 1
print(r.strip())


input()
print(*sorted([int(x) for x in input().split()]))


a = int(input())
grav = sorted([int(x) for x in input().split()])
for i in grav:
	print(i)


row = input().split(' ')
n = int(row[0])
c = []
v = input().split(' ')
for i in v:
	c.append(int(i))
c.sort()
print(*c, end=' ')


def Gravity():
	FirstInput = int(input())
	SecondInput = input()
	SecondInput = [int(s) for s in SecondInput.split(' ')]
	array = SecondInput
	Difference = 0
	if FirstInput == 0:
		return 1
	elif FirstInput == 1:
		print(SecondInput[0])
		return 1
	else:
		SecondInput.sort()
	return SecondInput
out = Gravity()
if out != 1:
	print('%s' % ' '.join(map(str, out)))


import sys
from sys import stdin, stdout
import bisect
from bisect import bisect_left as bl
from bisect import bisect_right as br
import itertools
from collections import Counter
import collections
import math
import heapq
import re

def modinv(n, p):
	return pow(n, p - 2, p)

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def most_frequent(list):
	return max(set(list), key=list.count)

def GCD(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def ncr(n, r, p):
	t = fact[n] * (ifact[r] * ifact[n - r] % p) % p
	return t

def Convert(string):
	li = list(string.split(''))
	return li

def SieveOfEratosthenes(n):
	global prime
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	f = []
	for p in range(2, n):
		if prime[p]:
			f.append(p)
	return f
prime = []
q = []

def dfs(n, d, v, c):
	global q
	v[n] = 1
	x = d[n]
	q.append(n)
	j = c
	for i in x:
		if i not in v:
			f = dfs(i, d, v, c + 1)
			j = max(j, f)
	return j

def main():
	n = inin()
	a = ain()
	a.sort()
	print(*a)
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


numBoxes = int(input())
boxes = [int(i) for i in input().split()]
boxes.sort()
for i in boxes:
	print(i, end=' ')


n = int(input())
sequence = [int(i) for i in input().split(' ')]
print(' '.join((str(val) for val in sorted(sequence))))


columns = int(input())
cubesInTheIthColumn = input().split(' ')

def copyItems(column):
	items = []
	for i in range(len(column)):
		item = int(cubesInTheIthColumn[i])
		items.append(item)
	return items

def flip(cubesInTheIthColumn, box):
	while cubesInTheIthColumn >= 0:
		for i in range(maximum):
			auxIndex = cubesInTheIthColumn
			while auxIndex < columns - 1:
				if box[i][auxIndex] == 1 and box[i][auxIndex + 1] == 0:
					box[i][auxIndex] = 0
					box[i][auxIndex + 1] = 1
				auxIndex += 1
		cubesInTheIthColumn -= 1

def getResult(box, maximum, columns):
	result = []
	for j in range(columns):
		count = 0
		for i in range(maximum):
			if box[i][j] == 1:
				count += 1
		result.append(count)
	return result

def getMessage(result):
	for i in result:
		print(i, end=' ')

def addToBox(columns, maximum):
	box = []
	for i in range(maximum):
		box.append([])
		for auxIndex in range(columns):
			box[i].append(0)
	return box
auxIndex = 0
cubes = copyItems(cubesInTheIthColumn)
maximum = max(cubes)
box = addToBox(columns, maximum)
for cube in cubes:
	top = maximum - cube
	while top >= 0 and top < maximum:
		box[top][auxIndex] = 1
		top += 1
	auxIndex += 1
flip(columns - 2, box)
result = getResult(box, maximum, columns)
getMessage(result)


n = int(input())
user_input = input()
li_st = user_input.split(' ')
newlist = []
for i in li_st:
	newlist.append(int(i))
newlist.sort()
output = ''
while len(newlist) > 1:
	output += str(newlist.pop(0)) + ' '
print(output + str(newlist.pop()))


x = int(input())
a = [int(x) for x in input().split(' ')]
a.sort()
print(*a)


n = int(input())
a = [int(i) for i in input().split()]
a.sort()
s = [str(k) for k in a]
print(' '.join(s))


input()
A = list(map(int, input().split()))
A.sort()
print(' '.join(map(str, A)))


from sys import stdin
inp = stdin
inp.readline()
nums = [int(x) for x in inp.readline().strip().split()]
nums.sort()
nums = [str(x) for x in nums]
print(' '.join(nums))


def GravitySort():
	n = int(input())
	columns = [*map(int, input().strip().split())]
	return sorted(columns)
a = GravitySort()
print(*a)


n = int(input())
nums = [int(x) for x in input().split()]
nums = list(sorted(nums))
for i in range(n):
	if i > 0:
		print(' ', end='')
	print(nums[i], end='')
print()


import functools
n = int(input())
a = [*map(int, input().split())]
b = [len(list(filter(lambda x: x >= i, a))) for i in range(1, max(a) + 1)]
c = [len(list(filter(lambda x: x >= i, b))) for i in reversed(range(1, max(b) + 1))]
for i in c:
	print(i, end=' ')
print()


n = int(input())
b = [int(i) for i in input().split()]
b.sort()
st = str(b[0])
for i in range(1, n):
	st = st + ' ' + str(b[i])
print(st)


no_of_columns = int(input())
blocks_count = list(map(lambda x: int(x), input().split(' ')))
blocks_count.sort()
print(' '.join([str(x) for x in blocks_count]))


n = int(input())
a = [int(x) for x in input().split()]
a.sort()
for var in a:
	print(var, end=' ')


t = int(input())
a = [int(i) for i in input().split()]
a.sort()
for i in range(t):
	print(a[i], end='')
	if i != t - 1:
		print(end=' ')
print()


def quicksort(array):
	less = []
	equal = []
	greater = []
	if len(array) > 1:
		pivot = array[0]
		for x in array:
			if x < pivot:
				less.append(x)
			if x == pivot:
				equal.append(x)
			if x > pivot:
				greater.append(x)
		return quicksort(less) + equal + quicksort(greater)
	else:
		return array
input()
list = input().split(' ')
for i in range(0, len(list)):
	list[i] = int(list[i])
new_list = quicksort(list)
for i in range(0, len(new_list)):
	print(new_list[i], end=' ')


import math
input()
arr = list(map(int, input().split()))
arr.sort()
for x in arr:
	print(x, end=' ')


n = int(input())
l = list(map(int, input().split()))
l.sort()
a = ''
for i in range(n - 1):
	a = a + str(l[i]) + ' '
a = a + str(l[n - 1])
print(a)


n = int(input())
a = input()
arr = [int(x) for x in a.split()]
aa = sorted(arr)
print(*aa, sep=' ')


n = input()
a = list(map(int, input().split()))
a.sort()
for i in a:
	print(str(i), end=' ')


n = int(input())
v = list(map(int, input().split(' ')))
v.sort()
for i in range(len(v)):
	print(v[i], end='\n' if i == len(v) - 1 else ' ')


_ = input()
nums = list(map(int, input().split()))
print(str(' '.join(map(str, sorted(nums)))))


def chupalo(algo):
	return int(algo)
a = input()
b = input().split()
b.sort(key=chupalo)
print(' '.join(b))


x = input('')
y = [int(x) for x in input('').split()]
y.sort()
print(*y)


n = int(input())
_list = [int(x) for x in input().split(' ')]
_list.sort()
_list = [str(x) for x in _list]
print(' '.join(_list))


x = input()
z = input().split(' ')
c = []
for i in z:
	c.append(int(i))
c.sort()
v = []
for i in c:
	v.append(str(i))
v = ' '.join(v)
print(v)


n = int(input())
data = [int(i) for i in input().split()]
data.sort()
out = ''
for i in data:
	out += str(i) + ' '
print(out)


a = int(input())
s = list(map(int, input().split()))
s = sorted(s)
s = [str(i) for i in s]
s = ' '.join(s)
print(s)


count = input()
nums = list(map(int, input().split()))
print(' '.join(map(str, sorted(nums))))


x = int(input())
g = list(map(int, input().split()))
g.sort()
print(*g)


x = int(input())
y = list(map(int, input().split()))
y.sort()
for i in range(len(y)):
	print(y[i], end=' ')


x = input()
y = input()
z = y.split()
for i in range(int(x)):
	z[i] = int(z[i])
z.sort()
for i in range(int(x)):
	print('%d ' % z[i], end='')


x = int(input())
l = list(map(int, input().split()))
for (j, i) in zip(range(1, len(l)), range(len(l))):
	while l[i] > l[j] and i != 0 and (j != 0):
		(l[j], l[i]) = (l[i], l[j])
		i -= 1
		j -= 1
	if l[0] > l[1]:
		(l[0], l[1]) = (l[1], l[0])
	else:
		pass
for i in range(x):
	l[i] = str(l[i])
print(' '.join(l))


size = int(input())
w = input()
q = list(map(int, (x for x in w.split() if x.isdigit())))
q.sort()
i = 0
while i < size:
	print(q[i], '', end='')
	i += 1


number = int(input())
list1 = list(sorted([int(x) for x in input().split()]))
print(' '.join([str(x) for x in list1]))


sum = 0
num = int(input())
array = list(map(int, input().split()))
array.sort()
print(*array)


n = int(input())
a = [int(i) for i in input().split()]
a = str(sorted(a))[1:-1]
a = a.replace(',', '')
print(a)


n = int(input())
downwards = sorted(list(map(int, input().split())))
print(*downwards)


from sys import stdin
b = stdin.readline()
y = stdin.readline()
z = y.split()
for i in range(0, int(b)):
	z[i] = int(z[i])
z.sort()
for i in range(0, int(b)):
	z[i] = str(z[i])
a = ' '.join(z)
print(a)


n = int(input())
a = [int(i) for i in input().split()]
a = sorted(a)
ans = ''
for item in a:
	ans = ans + str(item) + ' '
ans = ans[0:len(ans) - 1]
print(ans)


t = int(input())
l = list(map(int, input().split()))
l.sort()
for i in range(len(l)):
	print(l[i], end=' ')


a = int(input())
l = list(map(int, input().split()))
l.sort()
[print(l[x], end=' ') for x in range(len(l))]


input()
b = [int(x) for x in input().split(' ')]
a = ''
for x in sorted(b):
	a += str(x) + ' '
print(a.strip(' '))


input()
a = [int(i) for i in input().split()]
for i in range(len(a)):
	for j in range(len(a) - i - 1):
		if a[j] > a[j + 1]:
			(a[j + 1], a[j]) = (a[j], a[j + 1])
print(*(i for i in a))


int(input())
print(str(sorted(list(map(int, input().split())))).replace('[', '').replace(']', '').replace(',', ''))


n = int(input())
a = list(map(int, input().split()))
a.sort()
print(*a, end=' ')


n = int(input())
l = input().split()
l = list(map(lambda x: int(x), l))
while True:
	counter = 0
	for i in range(len(l)):
		if i < len(l) - 1 and l[i] > l[i + 1]:
			value = l[i]
			l[i] = l[i + 1]
			l[i + 1] = value
			counter += 1
	if counter == 0:
		break
for i in l:
	print(i, end=' ')


a = input()
b = [int(x) for x in input().split()]
b.sort()
b = [str(x) for x in b]
print(' '.join(b))


print(' '.join([str(s) for s in sorted([int(e) for e in input().split()])]) if input() else [])


n = int(input())
a = input().split()
for i in range(len(a) - 1):
	for j in range(i + 1, len(a)):
		if int(a[i]) > int(a[j]):
			temp = a[i]
			a[i] = a[j]
			a[j] = temp
for i in range(len(a)):
	print(a[i], end=' ')


def sortmyArray(arr):
	for i in range(1, len(arr)):
		temp = arr[i]
		j = i - 1
		while arr[j] > temp and j >= 0:
			arr[i] = arr[j]
			j = j - 1
			i = i - 1
		arr[j + 1] = temp
	return arr
n = int(input())
arr = list(map(int, input().split(' ')))
arr = sortmyArray(arr)
for a in arr:
	print(a, end=' ')


n = input()
items = [int(item) for item in input().split(' ')]
list.sort(items)
items = [str(item) for item in items]
out = ' '.join(items)
print(out)


n = int(input())
cupes = [int(i) for i in input().split()]
cupes.sort()
print(*cupes)


a = int(input())
b = input().strip().split()
x = list(b)
for i in range(0, a):
	x[i] = int(x[i])
x.sort()
for i in range(0, a):
	x[i] = str(x[i])
m = ' '.join(x)
print(m)


x = int(input())
y = input()
z = y.split()
array = []
for i in range(x):
	array.append(int(z[i]))
urray = []
for i in range(x):
	r = min(array)
	t = array.index(r)
	array.pop(t)
	urray.append(r)
result = ''
for i in range(x):
	result = result + str(urray[i])
	if i != x - 1:
		result = result + ' '
print(result)


n = int(input())
s = list((int(num) for num in input().strip().split()))[:n]

def matrix_num(s):
	len_arr = max(s)
	ans = []
	new_arr = [0] * len_arr
	for i in s:
		q = new_arr.copy()
		for j in range(i):
			q[j] = 1
		ans.append(q)
	return (ans, len_arr)

def reverse_matrix(arr, len_arr):
	ans = []
	for i in range(len_arr):
		zet = []
		for j in range(len(arr)):
			if arr[j][i] == 1:
				zet.append(1)
			else:
				zet.insert(0, 0)
		ans.append(zet)
	return ans
(A, len_arr) = matrix_num(s)
ans = reverse_matrix(A, len_arr)
for i in range(len(ans[0])):
	t = 0
	for j in range(len(ans)):
		t += ans[j][i]
	print(t)


N = int(input())
L = []
L = input().split()
for j in range(N):
	L[j] = int(L[j])
P = ''
while len(L) > 0:
	T = min(L)
	P += str(T) + ' '
	L.remove(T)
F = len(P) - 1
print(P[:F])


a = int(input())
line = input().split()
line.sort(key=lambda x: int(x))
print(' '.join(line))


def main():
	columns = int(input())
	columnsBoxes = list(map(int, input().split()))
	if 1 >= columns >= 100:
		return
	if 0 in columnsBoxes or 101 in columnsBoxes:
		return
	columnsBoxes.sort()
	print(*columnsBoxes)
main()


import sys
n = int(input())
list1 = input().split(' ')
x = list(map(int, list1))
x.sort()
for i in range(0, n):
	sys.stdout.write(str(x[i]))
	sys.stdout.write(' ')
print()


n = int(input())
s = list(map(int, input().strip().split(' ')))
s.sort()
s = map(str, s)
print(' '.join(s))


col = input()
cubes = list(map(int, input().split()))
cubes.sort()
cubes = ' '.join(map(str, cubes))
print(cubes)


n = int(input())
cubes = list(map(int, input().split()))
new_cubes = sorted(cubes)
for element in new_cubes:
	print(element, end=' ')


n = int(input())
sorted_cols = sorted([int(x) for x in input().strip().split()])
print(' '.join([str(x) for x in sorted_cols]))


_ = input()
columns = list(map(int, input().split()))
for i in list(sorted(columns)):
	print(i, end=' ')


n = int(input())
arr = sorted(list(map(int, input().split(' '))))
for digits in arr:
	print(digits, end=' ')


from sys import stdin
cols = stdin.readline()
blocks = stdin.readline().strip().split(' ')
flipped = sorted((int(i) for i in blocks))
for i in flipped:
	print(i, end=' ')


i = lambda : [*map(int, input().split())]
(n, arr) = (int(i()[0]), sorted(i()))
for i in range(0, n):
	print(arr[i], end=' ')


n = int(input())
m = [int(i) for i in input().split()]
o = []
for i in range(0, n):
	l = max(m)
	o.append(str(l))
	m.remove(l)
o.reverse()
print(' '.join(o))


n = int(input())
columns = list(map(int, input().split()))
for i in range(n - 1):
	for j in range(n - i - 1):
		if columns[j] > columns[j + 1]:
			(columns[j], columns[j + 1]) = (columns[j + 1], columns[j])
for i in range(n):
	print(columns[i], end=' ')


s = int(input())
l = []
z = input().split()
for i in range(len(z)):
	l.append(int(z[i]))
l.sort()
for i in l:
	print(i, end=' ')


n = int(input())
a = list(map(int, input().split()))
b = []
while True:
	blocks = 0
	for i in range(len(a)):
		if a[i] > 0:
			a[i] = a[i] - 1
			blocks += 1
	b.append(blocks)
	sum = 0
	for i in a:
		sum = sum + i
	if sum == 0:
		break
c = []
while True:
	blocks = 0
	for i in range(len(b)):
		if b[i] > 0:
			b[i] = b[i] - 1
			blocks += 1
	c.append(blocks)
	sum = 0
	for i in b:
		sum = sum + i
	if sum == 0:
		break
c.sort()
for i in c:
	print(i, end=' ')


n = input()
n = int(n)
a = input().split(' ')
cubos = []
caja = []
res = []
for i in range(len(a)):
	cubos.append(int(a[i]))
m = max(cubos)
for i in range(m):
	caja.append([])
	for j in range(n):
		caja[i].append(0)
j = 0
for cubo in cubos:
	tope = m - cubo
	while tope >= 0 and tope < m:
		caja[tope][j] = 1
		tope += 1
	j += 1

def flip(a):
	while a >= 0:
		for i in range(m):
			j = a
			while j < n - 1:
				if caja[i][j] == 1 and caja[i][j + 1] == 0:
					caja[i][j] = 0
					caja[i][j + 1] = 1
				j += 1
		a -= 1
flip(n - 2)
for j in range(n):
	cont = 0
	for i in range(m):
		if caja[i][j] == 1:
			cont += 1
	res.append(cont)
for i in res:
	print(i, end=' ')


n = int(input())
alist = input().strip().split(' ')
alist = [int(a) for a in alist]
h = max(alist)
matrix = [[0] * n for i in range(h)]
for j in range(h):
	for i in range(n):
		if alist[i] > 0:
			matrix[j][i] += 1
			alist[i] -= 1
	matrix[j].sort(reverse=True)
ans = [0] * n
for i in range(n):
	ans[i] = str(sum([matrix[j][i] for j in range(h)]))
ans = ans[::-1]
print(' '.join(ans))


n = int(input())
cubes = [int(i) for i in input().split()]
cubes.sort()
res = ''
for i in cubes:
	res += str(i) + ' '
print(res)


def saj(l):
	m = len(l)
	for i in range(m):
		l[i] = int(l[i])
	for i in range(m):
		f = 101
		for j in range(i, m):
			if l[j] < f:
				f = l[j]
				k = j
		temp = l[k]
		l[k] = l[i]
		l[i] = temp
	return l
n = int(input())
l = input().split()
l = saj(l)
for i in range(n):
	print(l[i], '', end='')


input()
l = list(map(int, input().split()))
l.sort()
print(' '.join((str(i) for i in l)))


columns = int(input())
blocks = [int(x) for x in input().split()]
blocks.sort()
for i in blocks:
	print(i, end=' ')


n = input()
a = ' '
c = sorted(list(map(int, input().split())))
d = map(str, c)
print(a.join(d))


n = int(input())
list = [int(x) for x in input().split()]
list.sort(key=int)
l = (str(x) for x in list)
l1 = ' '.join(l)
print(l1)


n = int(input())
A = [int(i) for i in input().split()]
A.sort()
out = []
for i in A:
	t = str(i)
	out.append(t)
print(' '.join(out))


x = input()
y = map(int, input().split())
y = sorted(y)
for i in y:
	print(i, end=' ')


import sys
input = sys.stdin.readline
import math as m

def inp():
	return int(input())

def inlt():
	return list(map(int, input().strip().split()))

def insr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().strip().split())
n = inp()
box = inlt()
box.sort()
print(' '.join(map(str, box)))


n = int(input())
a = [int(x) for x in input().split()]
a2 = []
M = max(a)
for m in range(M):
	a2.append(sum([i > m for i in a]))
M = max(a2)
a3 = []
for m in range(M - 1, -1, -1):
	a3.append(sum([i > m for i in a2]))
for a in a3:
	print(a, end=' ')


n_columns = int(input())
columns = list(map(int, input().split()))
columns.sort()
columns = map(str, columns)
print(' '.join(columns))


n = int(input())
b = [int(x) for x in input().split()]
b.sort()
print(*b)


n = int(input())
l = list(map(int, input().split()))
l = sorted(l)
l = list(map(str, l))
print(' '.join(l))


n = int(input())
li = [int(m) for m in input().split()]
for i in range(1, n):
	x = i
	while li[x] < li[x - 1] and x > 0:
		(li[x], li[x - 1]) = (li[x - 1], li[x])
		x -= 1
for j in range(n):
	print(li[j], end=' ')


t = int(input())
a = list(map(int, input().split()))
a.sort()
print(*a)


n = int(input())
ar = sorted(list(map(int, input().split())))
for i in ar:
	print(i)


import math
from sys import stdin, stdout, maxsize
n = int(stdin.readline())
l = [int(x) for x in stdin.readline().split()]
l.sort()
for x in l:
	print(x, end=' ')


n = int(input())
arr = list(map(int, input().split()))
arr.sort()
print(*arr, sep=' ')


n = int(input())
structure = input().split(' ')
for i in range(len(structure)):
	structure[i] = int(structure[i])
structure.sort()
final = ''
for i in range(len(structure)):
	if final == '':
		final += str(structure[i])
	else:
		final += ' ' + str(structure[i])
print(final)


n = int(input())
l = [int(x) for x in input().split()]
t = sorted(l)
for i in t:
	print(i, end=' ')


n = int(input())
l = [int(i) for i in input().split()]
b = sorted(l)
print(' '.join((str(j) for j in b)))


N = int(input())
box = [int(i) for i in input().split()]
box.sort()
fbox = []
for i in box:
	fbox.append(str(i))
print(' '.join(fbox))


columns_count = int(input())
columns = list(map(int, input().split()))
print(*sorted(columns))


a = int(input())
b = list(map(int, input().split()))
c = sorted(b)
d = []
for i in c:
	d.append(str(i))
print(' '.join(d))


n = int(input())
line = [int(x) for x in input().split()]
line.sort()
outcome = ''
for i in range(len(line)):
	outcome = outcome + ' ' + str(line[i])
print(outcome[1:])


n = int(input())
groups = [int(a) for a in input().split(' ')]
k = len(groups) - 1
while n > 0:
	count = len(groups) - 1
	while count > 0:
		i = groups[count]
		if i < groups[count - 1]:
			groups[count] = groups[count - 1]
			groups[count - 1] = groups[count - 1] - (groups[count - 1] - i)
		count = count - 1
	n = n - 1
count = 0
l = ''
while count < len(groups):
	i = groups[count]
	i = str(i)
	l = l + ' ' + i
	count += 1
l = l[1:]
print(l)


n = int(input())
lista = list(map(int, input().split()))
lista.sort()
print(*lista)


n = int(input())
cube = list(map(int, input().split()))
cube.sort(reverse=False)
cube = list(map(str, cube))
print(' '.join(cube))


n = int(input())
t = list(map(int, input().split()))
print(' '.join(list(map(str, sorted(t)))))


n = int(input())
A = list(map(int, input().split()))
B = sorted(A)
C = [str(i) for i in B]
print(' '.join(C))


n = int(input())
s = input()
s = s.split()
for i in range(0, n):
	s[i] = int(s[i])
s.sort()
a = ''
for i in s:
	a = a + str(i) + ' '
print(a)


def merge(arr1, arr2):
	(l1, l2) = (len(arr1), len(arr2))
	(i, j, k) = (0, 0, 0)
	while i < l1 or j < l2:
		if i < l1 and j < l2:
			if arr1[i] < arr2[j]:
				yield arr1[i]
				i += 1
			else:
				yield arr2[j]
				j += 1
		elif i < l1 and j >= l2:
			yield arr1[i]
			i += 1
		else:
			yield arr2[j]
			j += 1
		k += 1
	return

def sort_cube(arr):
	if len(arr) < 2:
		return arr
	return list(merge(sort_cube(arr[0:len(arr) // 2]), sort_cube(arr[len(arr) // 2:])))
input()
cube = sort_cube(list(map(int, input().split())))
for column in cube:
	print(column, end=' ')


def main():
	n = int(input())
	arr = input().split(' ')
	for i in range(0, n):
		arr[i] = int(arr[i])
	arr.sort()
	for i in range(0, n):
		print(arr[i], end=' ')
	print()
main()


def switch():
	numbers = list(map(int, input().split()))
	s = ''
	numbers.sort()
	for i in range(0, len(numbers)):
		if i == 0:
			s = s + str(numbers[i])
		else:
			s = s + ' ' + str(numbers[i])
	return s
n = input()
print(switch())


try:
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	for i in l:
		print(i, end=' ')
except:
	pass


n = int(input().strip())
A = list(map(int, input().strip().split()))
print(*sorted(A), sep=' ')


x = input()
nn = input()
arr = map(int, nn.split())
print(' '.join(map(str, sorted(arr))))


n = int(input())
s = input()
li = s.split()
output = ''
newl = []
for num in li:
	newl.append(int(num))
newl.sort()
for i in range(n):
	output += str(newl[i]) + ' '
print(output)


n = int(input())
lis = list(map(int, input().split()))
lis.reverse()
for i in range(n):
	for j in range(i + 1, n):
		if lis[j] > lis[i]:
			diffrence = lis[j] - lis[i]
			lis[i] += diffrence
			lis[j] -= diffrence
lis.reverse()
print(*lis)


n = input()
t = list(map(int, input().split()))
t.sort()
print(*t)


n = int(input())
a = [int(s) for s in input().split()]
a.sort()
print(*a)


n = input()
y = list(map(int, input().split()))
y.sort()
print(*y)


n = input()
L = list(input().split())
L.sort()
L.sort(key=lambda x: len(x))
m = ''
for i in range(int(n)):
	a = L[i]
	m = m + a + '.'
k = str(m)
print(k.replace('.', ' '))


import re
import math
l = input()
k = [int(i) for i in input().split()]
k.sort()
for i in k:
	print(i, end=' ')


n = int(input())
a = list(map(int, input().split()))
li = [sum((x >= i for x in a)) for i in range(1, 101)]
print(*list((sum((x + i >= n for x in li)) for i in range(0, n))))


q = input()
x = map(int, input().split())
y = sorted(x)
print(*y)


n = int(input())
m = input().split()
for i in range(len(m)):
	m[i] = int(m[i])
m.sort()
for i in range(len(m)):
	m[i] = str(m[i])
for i in range(n):
	m.insert(2 * i + 1, ' ')
print(''.join((m[i] for i in range(2 * n - 1))))


li = []
n = input()
li = list(map(int, input().split()))
type(li)
li.sort()
values = ' '.join((str(v) for v in li))
print(values)


n = int(input())
list_1 = [int(i) for i in input().split()]
list_2 = []
list_3 = []
for i in range(max(list_1)):
	list_4 = []
	list_5 = [1 for k in range(n)]
	for j in range(n):
		if list_1[j] >= i + 1:
			list_4.append(1)
		else:
			list_4.append(0)
	S = n - sum(list_4)
	for k in range(S):
		list_5[k] = 0
	list_3.append(list_5)
for i in range(n):
	list_2.append(sum([list_3[k][i] for k in range(len(list_3))]))
for i in range(n):
	print(list_2[i], end=' ')


n = int(input())
list = [int(i) for i in input().split()]
list.sort()
for i in list:
	print(i, end=' ')


n = int(input())
l = [int(a) for a in input().split()]
l.sort()
for num in l:
	print(num, end=' ')


n = int(input())
raw_rows = [int(i) for i in input().split()]
col_number = max(raw_rows)
cols = [0] * col_number
for i in range(col_number):
	for row in raw_rows:
		if row > i:
			cols[i] += 1
new_rows = [0] * n
for i in range(n):
	for col in cols:
		if col >= n - i:
			new_rows[i] += 1
output = ' '.join((str(i) for i in new_rows))
print(output)


n = int(input())
n1234 = input()
n1234 = n1234.split()
s = []
for i in n1234:
	s.append(int(i))
n1234 = s
s.sort()
for i in s:
	print(i, end=' ')


n = int(input())
box = [int(x) for x in input().split()]
box.sort()
for x in box:
	print(x, end=' ')


n = input()
columns = list((int(x) for x in input().split(' ')))
columns.sort()
print(' '.join((str(x) for x in columns)))


def StrToInt(list_entry):
	map_object = map(int, list_entry)
	return list(map_object)

def IntToStr(list_entry):
	map_object = map(str, list_entry)
	return list(map_object)
num_entrada = int(input())
numeros = StrToInt(input().split(' '))
numeros.sort()
print(' '.join(IntToStr(numeros)))


def swap(current, after):
	if columns[after] < columns[current]:
		(columns[current], columns[after]) = (columns[after], columns[current])
	else:
		pass
	if current != 0:
		swap(current - 1, after - 1)
n = int(input())
columns = []
columns.extend(list(map(int, input().split())))
for i in range(n - 1):
	swap(i, i + 1)
for i in range(n):
	print(columns[i], end=' ')


input()
l = list(map(int, input().split()))
l.sort()
for v in l:
	print(f'{v} ', end='')


def order_cube(n, clist):
	for i in range(0, n):
		flag = False
		for j in range(0, n - i - 1):
			if clist[j] > clist[j + 1]:
				temp = clist[j]
				clist[j] = clist[j + 1]
				clist[j + 1] = temp
				flag = True
	for k in clist:
		print(k, end=' ')
	return None
n = int(input())
clist = list(map(int, input().rstrip().split()))
order_cube(n, clist)


n = input()
x = []
h = input().split()
for i in range(int(n)):
	x.append(int(h[i]))
x.sort()
print(*x)


n = int(input())
a = list(map(int, input().split()))
for i in range(n):
	for j in range(i + 1, n):
		if a[i] > a[j]:
			(a[i], a[j]) = (a[j], a[i])
out = ''
for i in range(n):
	out = out + ' ' + str(a[i])
print(out[1:])


import sys
sys.stdin.readline()
cols = []
for num in sys.stdin.readline().split():
	cols.append(int(num))
for num in sorted(cols):
	print(num, end=' ')
print()


n = int(input())
numbers = [int(i) for i in input().split()]
numbers.sort()
numbers = [str(i) for i in numbers]
print(' '.join(numbers))


n = input()
m = input()
p = m.split()
f = [int(a) for a in p]
p = f
p.sort()
a = ''
for i in p:
	a = a + str(i) + ' '
a.rstrip()
print(a)


col_num = int(input())
cubes = sorted(map(int, input().split()))
for el in cubes:
	print(el, end=' ')


a = int(input())
t = list(map(int, input().split()))
t.sort()
for i in range(a):
	print(t[i], end=' ')


a = int(input())
b = list(map(int, input().split()))
b.sort()
print(' '.join((str(q) for q in b)))


x = int(input())
y = [int(a) for a in input().split()]
z = sorted(y)
for i in z:
	print(i, end=' ')


c = int(input())
cubos = [int(x) for x in input().split()]
cubos = [str(x) for x in sorted(cubos, key=lambda x: int(x), reverse=False)]
print(' '.join(cubos))


n = int(input())
lst = list(map(int, input().split()))
for i in range(n):
	print(min(lst), '', end='')
	lst.remove(min(lst))


n = int(input())
inputs = input()
inputs = inputs.split()
inputs = [int(x) for x in inputs]
inputs.sort()
for i in range(n):
	print(inputs[i], end=' ')


n = int(input())
array = [int(x) for x in input().split()]
array.sort()
for i in array:
	print(i, end=' ')


num_cols = int(input())
col_counts = list(map(int, input().split(' ')))

def fix_for_n(n, cur_cols):
	if n >= len(cur_cols) - 1:
		return cur_cols
	if cur_cols[n] > cur_cols[n + 1]:
		temp = cur_cols[n + 1]
		cur_cols[n + 1] = cur_cols[n]
		cur_cols[n] = temp
		cur_cols = fix_for_n(n + 1, cur_cols)
	return cur_cols
for i in reversed(range(num_cols)):
	col_counts = fix_for_n(i, col_counts)
print(' '.join(map(str, col_counts)))


z = input()
x = list(map(int, input().split()))
x.sort()
print(*x)


n = int(input())
cubes = list(map(int, input().split()))
cubes.sort()
print(*cubes, sep=' ')


n = input()
array = list(map(int, input().split()))
array.sort()
print(' '.join((str(num) for num in array)))


ln = int(input())
aa = input().split(' ')
for x in range(ln):
	aa[x] = int(aa[x])
aa.sort()
ans = ''
for x in aa:
	ans += '{} '.format(x)
print(ans)


n = int(input())
l = [int(x) for x in input().split()]
l.sort()
print(' '.join((str(x) for x in l)))


n = input('')
cubes = input('').split()
hits = False
processing = True
minusSum = 0
while processing:
	for ele in range(int(n)):
		if ele == 0:
			hits = False
		if ele == int(n) - 1 and hits == False:
			result = [int(i) for i in cubes]
			str1 = ' '.join((str(e) for e in result))
			print(str1)
			processing = False
		if ele < int(n) - 1:
			if int(cubes[ele]) > int(cubes[ele + 1]):
				minusSum = int(cubes[ele]) - int(cubes[ele + 1])
				cubes[ele] = str(int(cubes[ele]) - minusSum)
				cubes[ele + 1] = str(int(cubes[ele + 1]) + minusSum)
				hits = True


a = int(input())
l = list(map(int, input().split()))
d = sorted(l)
print(*d)


a = int(input())
b = list(map(int, input().split()))
b.sort()
print(*b, sep=' ')


n = int(input())
L = [int(x) for x in input().split()]
L.sort()
for k in range(n - 1):
	print(L[k], end=' ')
print(L[n - 1])


n = int(input(''))
s = input('')
l = s.split()
lst = list()
for x in l:
	x = int(x)
	lst.append(x)
lst.sort()
for i in lst:
	print(i)


num = int(input())
data = [int(i) for i in input().split()]
data.sort()
print(' '.join((str(i) for i in data)))


n = int(input())
a = input()
x = a.split(' ')
b = []
for i in x:
	b.append(int(i))
b = sorted(b)
c = []
for i in b:
	if 1 <= i <= 100:
		c.append(str(i))
if n == len(c) and 1 <= n <= 100:
	z = ' '.join(c)
	print(z)


n = int(input())
cubes = [int(x) for x in input().split()]
cubes.sort()
for i in cubes:
	print(i, end=' ')


n = int(input())
x = input()
x = x.split()
y = []
for i in x:
	a = int(i)
	y.append(a)
y.sort()
for i in y:
	print(i, end=' ')


n = input()
fuck = [int(i) for i in input().split()]
fuck.sort()
print(*fuck, sep=' ')


import math
import os
import random
import re
import sys
import functools
from operator import itemgetter, attrgetter
from collections import Counter
Y = lambda : list(map(int, input().split()))
n = int(input())
a = Y()
a.sort()
print(' '.join(list(map(str, a))))


n = int(input())
L = list(map(int, input().split()))
mn = 0
L.sort()
print(*L)


import math

def main(data):
	return sorted(data)

def output(data):
	for i in data:
		print(i, end=' ')
n = int(input())
data = list(map(int, input().split(' ')))
output(main(data))


n = int(input())
aList = [int(i) for i in input().split()]
aCount = [0] * 100
for a in aList:
	for i in range(a):
		aCount[i] += 1
newG = [0] * n
for a in aCount:
	for i in range(a):
		newG[i] += 1
newG.reverse()
for i in newG:
	print(i, end=' ')


input()
a = [int(i) for i in input().split()]
a.sort()
print(*a)


num = eval(input())
arr = input()
arr = arr.split()
arr = list(map(int, arr))
arr = sorted(arr)
print(*arr, sep=' ')


n = int(input())
lista = input().split()
sort_list = sorted(lista, key=int)
sort_list_string = ' '.join(sort_list)
print(sort_list_string)


a = int(input())
b = [int(i) for i in input().split()]
b.sort()
for i in b:
	print(i, end=' ')


n = int(input())
s = list(map(int, input().split()))
print(*sorted(s))


n = int(input())
a = [*map(int, input().split())]
a.sort()
print(*a)


from sys import stdin, stdout
column = int(stdin.readline())
cubes = list(map(int, stdin.readline().split()))
cubes.sort()
i = 0
while i < column - 1:
	print(cubes[i], end=' ')
	i += 1
print(cubes[i])


a = int(input())
c = [int(i) for i in input().split(' ')]
i = 0
c.sort()
s = ''
for i in c:
	s += str(i) + ' '
print(s)


n = int(input())
nth = input().split()
nth = list(map(int, nth))
maxnth = max(nth)
ith = []
for j in range(maxnth):
	c = 0
	for i in nth:
		if i != 0:
			c += 1
	ith.append(c)
	for i in range(n):
		if nth[i] != 0:
			nth[i] -= 1
nths = []
for i in range(n):
	nths.append(0)
for i in range(len(ith)):
	while ith[i] != 0:
		for j in range(n):
			nths[j] += 1
			ith[i] -= 1
			if ith[i] == 0:
				break
finallist = []
for i in range(n):
	finallist.append(nths[-i - 1])
for i in finallist:
	print(i, end=' ')


n = int(input())
pieces = input().split()
a = []
for i in pieces:
	a.append(int(i))
h = max(a)
b = [0] * h
for i in range(h):
	for j in range(n):
		if a[j] >= i + 1:
			b[i] += 1
l = max(b)
c = [0] * n
for i in range(l):
	for j in range(h):
		if b[j] >= i + 1:
			c[n - i - 1] += 1
d = []
for i in c:
	d.append(str(i))
print(' '.join(d))


def solve():
	n = input()
	res = sorted([int(i) for i in input().split()])
	print(' '.join(map(str, res)))
solve()


n = int(input())
blok = input().split()
for i in range(n - 1):
	for j in range(i + 1, n):
		if int(blok[i]) > int(blok[j]):
			temp = blok[i]
			blok[i] = blok[j]
			blok[j] = temp
for i in range(n):
	print(blok[i], end=' ')


(numOfCubes, CubePERcol) = (int(input()), [int(x) for x in input().split()])
print(' '.join([str(x) for x in sorted(CubePERcol)]))


input1 = input('')
input2 = input('')
input2 = input2.split(' ')
for i in range(len(input2)):
	input2[i] = int(input2[i])
input2.sort()
result = ''
for item in input2:
	result += str(item) + ' '
print(result[0:-1])


def swap(a, b):
	return (b, a)

def bubbleSort(arr, n):
	for i in range(n):
		for j in range(0, n - i - 1):
			if arr[j] > arr[j + 1]:
				(arr[j], arr[j + 1]) = swap(arr[j], arr[j + 1])
n = int(input())
l = list(map(int, input().split()))
bubbleSort(l, n)
for i in range(n):
	print(l[i], end=' ')
print()


import math
n = int(input())
a = list(map(int, input().split()))
a.sort()
print(*a)


print(input()[:0] + ' '.join(map(str, sorted(map(int, input().split())))))


n = int(input())
li = [int(c) for c in input().split()]
li.sort()
print(*li)


n = int(input())
l = list(map(int, input().split(None, n)[:n]))
l.sort()
for i in l:
	print('%d' % i, end=' ')
print('')


n = input()
l = list(map(int, input().split()))
for i in range(0, len(l)):
	for j in range(1, len(l) - i):
		if l[i] > l[j * -1]:
			sup = l[i] - l[j * -1]
			l[i] -= sup
			l[j * -1] += sup
for i in l:
	print(i, end=' ')


n = int(input())
cols = list(map(int, input().split()))
cols.sort()
for col in cols:
	print(col, end=' ')


import sys, os.path
sys.setrecursionlimit(10 ** 5)

def i():
	return sys.stdin.readline().strip()

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

def li():
	return list(sys.stdin.readline().strip())

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

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

def solve():
	a = ii()
	b = sorted(lii())
	print(' '.join([str(x) for x in b]))
solve()


num = int(input())
l1 = list(map(int, input().strip().split()))
l1.sort()
for i in l1:
	print(i, end=' ')


n = input()
string = input()
string = string.split(' ')
x = []
for item in string:
	x.append(int(item))
x.sort()
result = ''
for item in x:
	result += str(item) + ' '
print(result[0:len(result) - 1])


from math import ceil
n = int(input())
l = list(map(int, input().split()))
l.sort()
for i in l:
	print(i, end=' ')


c = int(input())
boxes = input().split(' ')
boxes = sorted([int(x) for x in boxes])
print(' '.join([str(box) for box in boxes]))


n = int(input())
d = list(map(int, input().strip().split()[:n]))
d.sort()
print(*d)


n = int(input())
lst = list(map(int, input().split()))
for i in range(n - 1, -1, -1):
	for j in range(i - 1, -1, -1):
		if lst[i] < lst[j]:
			temp = lst[j] - lst[i]
			lst[i] += temp
			lst[j] -= temp
for item in lst:
	print(item, end=' ')


n = int(input())
cubes = [int(i) for i in input().split()[:n]]
for i in range(n):
	for j in range(n - 1):
		if cubes[j] > cubes[j + 1]:
			(cubes[j], cubes[j + 1]) = (cubes[j + 1], cubes[j])
print(*cubes)


n = int(input())
l = [int(num) for num in input().split(' ')]
l.sort()
print(*l)


n = int(input())
l = list(map(int, input().split()))
l.sort()
print(' '.join((str(e) for e in l)))


y = int(input())
x = list(map(int, input().split()))
x.sort()
x = ' '.join(list(map(str, x)))
print(x)


n = int(input())
h = list(map(int, input().split()))
h.sort()
st = ''
for i in h:
	st = st + ' %d' % i
print(st.lstrip())


column = input()
cubesPerColumn = input().split()
orderedArrays = sorted(map(int, cubesPerColumn))
gravitySwitch = map(str, orderedArrays)
print(' '.join(gravitySwitch))


def gravity_flip(n, l):
	s = sorted(l, key=lambda x: int(x))
	s = ' '.join(s)
	print(s)
n = int(input())
l = input()
l = l.strip().split(' ')
gravity_flip(n, l)


n = int(input())
x = [int(i) for i in input().split()]
x.sort()
print(*x, sep=' ')


qtd_numeros = input()
cubos = input().split()
for i in range(int(qtd_numeros) - 1, -1, -1):
	for j in range(int(qtd_numeros) - 1):
		if j + 1 < int(qtd_numeros):
			if int(cubos[j]) > int(cubos[j + 1]):
				temp = int(cubos[j])
				cubos[j] = int(cubos[j + 1])
				cubos[j + 1] = int(temp)
print(*cubos)


n = int(input())
columns = sorted(list(map(int, input().split())))
print(' '.join(map(str, columns)))


t = int(input())
arr = list(map(int, input().split()))
print(' '.join(map(str, sorted(arr))))


n = int(input())
cols = list(map(int, input().split()))
print(*sorted(cols))


columns = int(input())
cubes = [int(a) for a in input().strip().split()]
cubes.sort()
cubes = [str(a) for a in cubes]
print(' '.join(cubes))


n = int(input())
nums = list(map(int, input().split(' ')))
nums.sort()
print(' '.join(map(str, nums)))


x = int(input())
arr = list(map(int, input().split(' ')))
arr.sort()
print(*arr, sep=' ')


n = input()
A = list(map(int, input().split()))
for j in range(len(A) - 1, 0, -1):
	if max(A[:j]) > A[j]:
		(A[A.index(max(A[:j]))], A[j]) = (max(A[:j]) - (max(A[:j]) - A[j]), max(A[:j]))
print(' '.join(map(str, A)))


n = int(input())
i = (int(x) for x in input().split())
L = sorted(i)
for x in L:
	print(x, end=' ')


h = int(input())
t = list(map(int, input().split()))
t.sort()
print(*t)


n = int(input())
a = input().split()
a.sort(key=lambda x: int(x))
print(' '.join(a))


n = input()
b = sorted(input().split(), key=int)
print(' '.join(b))


import math
n = int(input())
data = list(map(int, input().split()))
data.sort()
for i in range(n - 1):
	print(data[i], end=' ')
print(data[-1])


n = input()
_list = input()
_list = _list.split(' ')
sorted_list = ''
for i in range(0, int(n)):
	min = None
	for element in _list:
		if not min:
			min = element
		elif int(element) <= int(min):
			min = element
	_list.pop(_list.index(min))
	sorted_list += str(min) + ' '
print(sorted_list)


n = int(input())
s = list(map(int, input().split()))
s.sort()
i = 0
while i < n:
	print(s[i], end=' ')
	i = i + 1


from sys import stdin
l = [[int(y) for y in x.rstrip().split()] for x in stdin.readlines()][1]
for x in range(len(l) - 1, 0, -1):
	for y in range(x - 1, -1, -1):
		if l[y] > l[x]:
			(l[x], l[y]) = (l[y], l[x])
print(' '.join((str(x) for x in l)))


def main():
	input()
	print(*sorted(map(int, input().split())))
main()


(rows, prevR, nextR, a, res) = (int(input()), [int(x) for x in input().split()], [], 0, [])

def consumer(prevR):
	(nextR, a, res) = ([], 0, [])
	for i in range(1, max(prevR) + 1):
		for x in prevR:
			if x >= i:
				nextR.append(x)
				a += 1
		res.append(a)
		(a, prevR, nextR) = (0, nextR, [])
	return res
for x in reversed(consumer(consumer(prevR))):
	print(x, end=' ')


n = input()
tmp = input().split()
tmp = list(map(int, tmp))
tmp.sort()
tmp = list(map(str, tmp))
answer = ' '.join(tmp)
print(answer)


n = int(input())
v = []
h = [int(x) for x in input().split()]
h.sort()
for j in h:
	print(j, end=' ')


a = input()
n = int(a)
l = list(map(int, input().split()))
d = sorted(l)
for m in d:
	print(m, end=' ')


n = int(input())
height = [int(num) for num in input().split()]
row_num = 0
length = [0 for k in range(100)]
column = [0 for k in range(n)]
for h in height:
	for i in range(h):
		length[i] += 1
for l in length:
	for i in range(l):
		column[n - i - 1] += 1
print(*column, sep=' ')


import sys
print(' '.join((str(a) for a in sorted((int(a) for a in sys.stdin.readlines()[1].split())))))


input()
lista = input().split(' ')
lista2 = []
for elem in lista:
	lista2.append(int(elem))
lista2.sort()
s = ''
for elem in lista2:
	s += str(elem) + ' '
print(s)


i = int(input())
k = input().split()
k.sort(key=int)
for i in k:
	print(i, end=' ')


r = int(input())
c = input()
cubes = c.split()
cubes1 = []
for i in cubes:
	cubes1.append(int(i))
flip = sorted(cubes1)
for i in flip:
	print(f'{i} ', end='')


input()
a = input().split(' ')
a = [int(i) for i in a]
a.sort()
b = ''
for x in a:
	b += str(x) + ' '
print(b[:-1])


A = int(input())
B = list(map(int, input().split()))
B.sort()
for i in B:
	print(i, end=' ')


n = int(input())
cubes = list(map(int, input().split()))
cubes.sort()
for cube in cubes:
	print(cube, end=' ')


n = int(input())
li = list(map(int, input().split()))
li.sort()
for i in range(len(li)):
	print(li[i])


n = int(input())
c = input().split()
for cube in c:
	int(cube)
c.sort(key=int)
for smth in c:
	print(smth, end=' ')


quanto = int(input())
lista = list(map(int, input().split()))
lista.sort()
for c in range(quanto):
	if c == quanto - 1:
		print(str(lista[c]), end='')
	else:
		print(str(lista[c]) + ' ', end='')


from sys import stdin
n = int(stdin.readline())
a = sorted(list(map(int, stdin.readline().split())))
print(*a)


import sys
lines = sys.stdin.readlines()
nums = lines[1].strip().split(' ')
nums.sort(key=int)
print(' '.join(nums))


input()
s = []
l = [int(x) for x in input().split()]
l.sort()
for i in range(len(l)):
	s.append(str(l[i]))
print(' '.join(s))


n = input()
A = [int(x) for x in input().split()]
A.sort()
for i in range(len(A)):
	print(A[i])


a = int(input())
b = list(input().split())
for i in range(0, len(b)):
	for j in range(i, len(b)):
		if int(b[i]) > int(b[j]):
			temp = b[i]
			b[i] = b[j]
			b[j] = temp
string = ''
for i in range(0, len(b)):
	string = string + ' ' + b[i]
print(string)


def main():
	input()
	tab = list(map(int, input().split()))
	tab.sort()
	print(' '.join(map(str, tab)))
main()


n = int(input())
cupes = input().split()
cupes.sort(key=int)
print(*cupes)


n = int(input())
lst = [int(i) for i in input().split()]
ver_lst = 100 * [0]
for i in lst:
	for j in range(i):
		ver_lst[j] += 1
output = n * [0]
for i in ver_lst:
	for j in range(i):
		output[-j - 1] += 1
for i in range(len(output)):
	output[i] = str(output[i])
print(' '.join(output))


input()
a = map(int, input().split())
a = map(str, sorted(a))
print(' '.join(a))


a = int(input())
lst = list(map(int, input().split()))
print(*sorted(lst))


n = int(input())
ls = input().split(' ')
lst = []
for i in range(n):
	for x in range(int(ls[i])):
		try:
			lst[x] += 1
		except IndexError:
			lst.append(1)
ls = []
for i in range(n):
	ls.append(0)
for i in range(len(lst)):
	for x in range(int(lst[i])):
		ls[len(ls) - x - 1] += 1
s = ''
for i in ls:
	s += str(i)
	s += ' '
print(s[:-1])


column = int(input())
data = input().split(' ')
for i in range(0, column):
	data[i] = int(data[i])
data.sort()
for i in range(0, column):
	print(data[i], end=' ')


column = int(input())
cubes = list(map(int, input().split()))
for i in range(len(cubes)):
	for j in list(range(i + 1, len(cubes))[::-1]):
		if cubes[i] > cubes[j]:
			a = cubes[i] - cubes[j]
			cubes[j] = cubes[i]
			cubes[i] -= a
		else:
			cubes[i] = cubes[i]
cubes = [str(i) for i in cubes]
print(' '.join(cubes))


n = int(input())
line = input().split()
li = []
for i in line:
	li.append(int(i))
li.sort()
output = ''
b = len(li)
for i in range(b - 1):
	output = output + str(li[i]) + ' '
output = output + str(li[b - 1])
print(output)


__author__ = 'Bian'
g = [0] * 100
n = int(input())
m = [int(x) for x in input().split()]
for i in m:
	for j in range(i):
		g[j] += 1
maxi = max(m)
pr = g[:maxi]
m = [0] * n
for i in pr:
	for j in range(i):
		m[n - 1 - j] += 1
m = [str(x) for x in m]
print(' '.join(m))


n = int(input())
x = input().split(' ')
mylist = []
out = ''
for i in x:
	mylist.append(int(i))
mylist = sorted(mylist)
for i in mylist:
	out += str(i) + ' '
print(out)


def f():
	x = int(input())
	a = list(map(int, input().split()))
	a.sort()
	print(*a)
f()


input()
l = sorted(list(map(int, input().split())))
for i in l:
	if i is not l[-1]:
		print(i, end=' ')
	else:
		print(i)


n = int(input())
walls = [int(x) for x in input().split()]
print(*sorted(walls))


times = int(input())
a = list(map(int, input().split()))
a.sort()
anse = ''
for i in range(len(a)):
	if i != 0:
		anse = anse + ' ' + str(a[i])
	elif i == 0:
		anse = anse + str(a[i])
print(anse)


n = int(input())
c = list(map(int, input().split()))
c.sort()
print(' '.join(list(map(str, c))))


column = int(input())
box = input().split(' ')
for i in range(column):
	box[i] = int(box[i])
box_f = sorted(box)
for i in range(column):
	if i == column - 1:
		print(str(box_f[i]), end='')
	else:
		print(str(box_f[i]), end=' ')


n = int(input())
l = [int(ele) for ele in input().split()]
lso = sorted(l)
print(*lso)


n = int(input())
li = list(map(int, input().split()))
li.sort()
print(*li)


k = int(input())
col = [int(n) for n in input().split()]
col.sort()
for i in col:
	print(i, end=' ')


A = input()
B = input()
col = B.split(' ')
colnum = [int(i) for i in col]
colnum.sort()
colnum = [str(i) for i in colnum]
print(' '.join(colnum))


n = int(input())
p = list(map(int, input().split()))
p.sort()
print(' '.join(list(map(str, p))))


n = int(input())
s = input()
a = [int(x) for x in s.split()]
c = []
ans = []
for x in range(101):
	c.append(0)
	ans.append(0)
for x in a:
	for y in range(1, x + 1):
		c[y] += 1
for x in c:
	for y in range(n - x + 1, n + 1):
		ans[y] += 1
for x in range(1, n):
	print(ans[x], end=' ')
print(ans[n])


col = int(input())
values = list(map(int, input().split()))
print(' '.join([str(i) for i in sorted(values)]))


n = int(input())
ls = [int(x) for x in input().split()]
ls.sort()
ls = [str(x) for x in ls]
print(' '.join(ls))


count = int(input())
high = [int(i) for i in input().split()]
low = []
for i in range(len(high)):
	s = min(high)
	low.append(str(s))
	high.remove(s)
print(' '.join(low))


a = input()
b = input()
l = b.split(' ')
l1 = []
for i in l:
	l1.append(int(i))
l2 = sorted(l1)
l3 = []
for j in l2:
	l3.append(str(j))
b1 = ' '.join(l3)
print(b1)


n = int(input())
m = input()
l = []
l = m.split(' ')
for j in range(len(l)):
	l[j] = int(l[j])
l.sort()
for i in range(len(l)):
	print(str(l[i]) + ' ', end='')


l = int(input())
li = list(map(int, input().split()))
li = sorted(li)
for i in li:
	print(f'{i}', end=' ')


x = int(input())
y = list(map(int, input().split()))
y.sort()
z = ''
for n in range(x):
	z = z + str(y[n]) + ' '
print(z)


n = int(input())
A = list(map(int, input().rstrip().split()))
A.sort()
print(' '.join(map(str, A)))


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

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

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	n = I()
	a = sorted(LI())
	return ' '.join(map(str, a))
print(main())


A = int(input())
B = [int(x) for x in input().split()]
B.sort()
D = str(B[0])
for x in range(1, A):
	D = D + ' ' + str(B[x])
T = len(D)
print(D[0:T])


line_number = input()
lines = list(input().split())
lines_1 = []
for i in lines:
	i = int(i)
	lines_1.append(i)
lines_1.sort()
lines_ans = []
for o in lines_1:
	o = str(o)
	lines_ans.append(o)
print(' '.join(lines_ans))


n = int(input())
i = input()
i = i.split()
l = []
for j in i:
	l.append(int(j))
l.sort()
print(*l)


q = int(input())
j = input()
a = j.split(' ')
a = [int(i) for i in a]
a.sort()
print(' '.join([str(j) for j in a]))


n = int(input())
l = list(map(int, input().split()))
for i in range(1, n + 1):
	for j in range(i + 1, n + 1):
		if l[-j] > l[-i]:
			d = l[-j] - l[-i]
			c = l[-i] + d
			b = l[-j] - d
			(l[-i], l[-j]) = (c, b)
for li in l:
	print(li, end=' ')


def partition(arr, low, high):
	i = low - 1
	pivot = arr[high]
	for j in range(low, high):
		if arr[j] <= pivot:
			i = i + 1
			(arr[i], arr[j]) = (arr[j], arr[i])
	(arr[i + 1], arr[high]) = (arr[high], arr[i + 1])
	return i + 1

def quickSort(arr, low, high):
	if low < high:
		pi = partition(arr, low, high)
		quickSort(arr, low, pi - 1)
		quickSort(arr, pi + 1, high)
a = int(input())
arr = [int(i) for i in input().strip('').split(' ')]
n = len(arr)
quickSort(arr, 0, n - 1)
arr2 = []
for i in range(n):
	print('%d' % arr[i], end=' ')


content1 = input()
arr = [int(x) for x in input().split()]
arr.sort()
result = ' '.join((str(x) for x in arr))
print(result)


import sys
import math
t = int(input())
a = list(map(int, input().split()))
a.sort()
print(*a)


i = input
i()
print(' '.join(map(str, sorted(map(int, i().split())))))


n = int(input())
c = input().split()
for i in range(n):
	c[i] = int(c[i])
c.sort()
for i in range(n):
	print(c[i], end=' ')


n = int(input())
l = list(map(int, input().strip().split()))
l.sort()
print(*l, sep=' ')


def main():
	input()
	L = [int(x) for x in input().split()]
	L.sort()
	print(' '.join((str(x) for x in L)))
main()


num = int(input())
elem = str(input())
elem = [int(i) for i in elem.split()]
if num == len(elem):
	for j in range(num):
		for i in range(0, len(elem) - 1):
			if elem[i] > elem[i + 1]:
				(elem[i], elem[i + 1]) = (elem[i + 1], elem[i])
	elem = ' '.join((str(k) for k in elem))
	print(elem)


n = int(input())
z = list(map(int, input().split()))
z.sort()
for i in range(n):
	if i == n - 1:
		print(z[i])
	else:
		print(z[i], end=' ')


columns = input()
print(*sorted(map(int, input().split())))


num_col = input()
num_cube = input()
space = ' '
x = map(int, num_cube.split(' '))
sorted_x = sorted(x)
y = map(str, sorted_x)
print(space.join(y))


n = int(input())
cols = []
output = ''
i = 0
temp = 0
cols = [int(i) for i in input().split()]
while i < len(cols):
	aux = 1
	while i + aux < len(cols):
		if cols[i] > cols[i + aux]:
			temp = cols[i + aux]
			cols[i + aux] = cols[i]
			cols[i] = temp
		aux += 1
	i += 1
for number in cols:
	output += str(number) + ' '
print(output)


n = int(input())
p = list(map(int, input().split()))[:n]
p = sorted(p)
p = ' '.join(map(str, p))
print(p)


n = input()
nlist = [int(i) for i in input().split()]
result = sorted(nlist)
final = ' '.join([str(i) for i in result])
print(final)


n = int(input())
column = input().split()
columnn = column
for i in range(n):
	column[i] = int(columnn[i])
column.sort()
columnn = column
for i in range(n):
	column[i] = str(columnn[i])
output = ' '.join(column)
print(output)


x = int(input())
l = list(map(int, input().split()))
l.sort()
l = list(map(str, l))
l = ' '.join(l)
print(l)


n = int(input())
s = input() + ' '
numbers = list()
i = 0
while i < len(s):
	space = s.find(' ', i)
	numbers.append(int(s[i:space]))
	i = space + 1
sortednumbers = list()
while len(numbers) != 0:
	sortednumbers.append(min(numbers))
	numbers.remove(min(numbers))
for item in sortednumbers:
	print(item, end=' ')


n = int(input())
l = [int(i) for i in input().split()]
a = sorted(l)
b = str(a[0])
for i in range(1, n):
	b += ' ' + str(a[i])
print(b)


n = int(input())
a = list(map(int, input().split()))
a.sort()
a = str(a)
a = a[1:len(a) - 1]
a = a.replace(',', '')
print(a)


n = int(input())
arr = [int(x) for x in input().split()]
arr = sorted(arr)
s = ''
for i in range(len(arr)):
	s = s + str(arr[i]) + ' '
print(s)


i = input
i()
s = list(map(int, i().split()))
s.sort()
ss = [str(x) for x in s]
print(' '.join(ss))


input()
num = sorted(list(map(int, input().split())))
for n in num:
	print(n, end=' ')


m = input()
n = list(map(int, input().split()))
n.sort()
i = ''
for j in n:
	i = i + str(j) + ' '
print(i)


number_of_columns = int(input())
box = [int(x) for x in input().split()]
box.sort()
for i in range(len(box)):
	print(box[i], end=' ')


n = int(input())
s = input()
k = list(map(int, s.split()))
k.sort()
p = list(map(str, k))
print(' '.join(p))


a = int(input())
b = input().split(' ')
b = list(b)
b.sort(key=int)
c = ''
for i in range(len(b)):
	c = c + b[i] + ' '
print(c)


n = int(input())
s = input().split()
box = []
for b in s:
	box.append(int(b))
i = n - 1
while i > 0:
	for j in range(i):
		if box[i] < box[j]:
			swap = box[j] - box[i]
			box[j] -= swap
			box[i] += swap
	i -= 1
for i in range(n):
	print(box[i], end=' ')


def run():
	num_cols = int(input())
	cols = [int(x) for x in input().split()]
	cols = sorted(cols)
	for x in range(0, len(cols) - 1):
		print(cols[x], end=' ')
	print(cols[len(cols) - 1])
run()


n = int(input())
s = input()
s = s.split()
t = []
for i in range(0, n):
	t.append(int(s[i]))
t.sort()
s = ''
for i in range(0, n):
	s = s + str(t[i]) + ' '
print(s)


n = int(input())
a = list(map(int, input().split()))
t = sorted(a)
for j in t:
	print(j, end=' ')


numCols = int(input())
quntCol = list(map(int, input().split()))
quntCol.sort()
result = ''
for index in range(numCols):
	result += str(quntCol[index])
	if index < numCols - 1:
		result += ' '
print(result)


lenn = int(input())
arr = list(map(int, input().rstrip().split()))
arr.sort()
str1 = ' '.join((str(x) for x in arr))
print(str1)


from sys import *
columnas = int(input())
bloques = input().split(' ')
bloques = [int(x) for x in bloques]
altura = int(max(bloques))
matriz = []
for i in range(altura):
	matriz.append([])
	for j in range(columnas):
		matriz[i].append(0)
for i in range(altura - 1, -1, -1):
	for j in range(columnas):
		if bloques[j] >= altura - i:
			matriz[i][j] = 1
for i in range(altura):
	for j in range(columnas):
		pass
for i in range(altura):
	for j in range(columnas):
		pass
cantidad = []
for i in range(altura):
	cantidad.append(matriz[i].count(1))
matriz1 = [[]]
for i in range(altura):
	matriz1.append([])
	for j in range(columnas):
		matriz1[i].append(0)
for i in range(altura):
	for j in range(columnas - 1, -1, -1):
		pass
		if cantidad[i] >= columnas - j:
			matriz1[i][j] = 1
for i in range(altura):
	for j in range(columnas):
		pass
lista = [0 for i in range(columnas)]
for i in range(altura):
	for j in range(columnas):
		if matriz1[i][j] == 1:
			lista[j] += 1
for x in range(columnas):
	print(lista[x], end=' ')


n = int(input())
l = list(map(int, input().split()))
a = []
for i in range(n):
	a.append(max(l))
	k = l.index(max(l))
	del l[k]
a.reverse()
for j in range(n):
	if j < n - 1:
		print(a[j], end=' ')
	else:
		print(a[j])


n = int(input())
m = list(map(int, input().split()))
m.sort()
m = list(map(str, m))
print(' '.join(m))


n = int(input())
nums = input().split()
for i in range(n):
	nums[i] = int(nums[i])
nums.sort()
for i in range(n):
	print(nums[i], end=' ')


from sys import stdin
stdin.readline()
print(*sorted(map(int, stdin.readline().strip().split())))


n = int(input())
a = input().split()
x = []
for i in range(n):
	x += [int(a[i])]
x.sort(reverse=False)
b = ''
for i in range(n):
	b += ' ' + str(x[i])
print(b.lstrip())


m = input()
n = input()
cubes = n.split()
list1 = map(int, cubes)
list2 = map(str, sorted(list1))
print(' '.join(list2))


n = int(input())
c = list(map(int, input().split()))
c.sort()
print(*c)


c = int(input())
n = input()
li = list(n.split(' '))
new = [int(x) for x in li]
new.sort()
for x in range(c):
	print(new[x], end=' ')


import math
for _ in range(1):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	arr = list(map(str, arr))
	print(' '.join(arr))


n = int(input())
l = [int(x) for x in input().split()]
l.sort()
for i in range(n):
	l[i] = str(l[i])
r = ' '.join(l)
print(r)


noOfColumns = input()
noOfCubesInEachColumn = [int(x) for x in input().split(' ')]
print(' '.join([str(x) for x in sorted(noOfCubesInEachColumn)]))


n = int(input())
nm = list(map(int, input().split(' ')))
nm.sort()
print(' '.join(map(str, nm)))


Cols = int(input())
stacks = [int(x) for x in input().split()]
stacks.sort()
stacks = [str(x) for x in stacks]
print(' '.join(stacks))


def main():
	a = int(input())
	list_a = list(input().split())
	list_b = []
	for k in list_a:
		list_b += [int(k)]
	list_b.sort()
	out = ''
	for i in list_b:
		out += str(i)
		out += ' '
	print(out.strip())
main()


a = (list(map(int, input().split())) + list(map(int, input().split())))[1:]
a.sort()
print(*a)


N = int(input())
A = list(map(int, input().split()))
A.sort()
ans = str(A[0])
for i in range(1, N):
	ans = ans + ' ' + str(A[i])
print(ans)


columns = int(input())
input_columns = sorted([int(x) for x in input().split(' ')])
input_columns_str = [str(x) for x in input_columns]
print(' '.join(input_columns_str))


n = int(input())
s = input().split(' ')
s1 = []
for i in s:
	s1.append(int(i))
a = sorted(s1)
for i in a:
	print(i, end=' ')


n = input()
box = input()
box2 = box.split(' ')
boxn = list((int(i) for i in box2))
boxn.sort()
out = ''
for i in range(int(n)):
	out += str(boxn[i]) + ' '
out.strip(' ')
print(out)


num = int(input())
arr = [int(x) for x in input().split()]
s = ' '.join((str(i) for i in sorted(arr)))
print(s)


n = int(input())
a = sorted(list(map(int, input().split())))
a = [str(u) for u in a]
print(' '.join(a))


_ = input()
a = list(map(int, input().split()))
print(' '.join(map(str, sorted(a))))


n = int(input())
listOrig = list(map(int, input().split()))
k = max(listOrig)
listCount = [0] * k
for i in listOrig:
	listCount[i - 1] += 1
for i in range(1, k + 1):
	if listCount[i - 1] > 0:
		print((str(i) + ' ') * listCount[i - 1], end='')


n = int(input())
p = [int(i) for i in input().split()]
p = sorted(p)
for i in p:
	print(i, end=' ')


def main():
	input()
	line = [int(it) for it in input().split(' ')]
	line.sort()
	for it in line:
		print(it, end=' ')
main()


def main():
	n = int(input())
	ls = list(map(int, input().split()))
	ls.sort()
	print(' '.join((str(i) for i in ls)))
main()


arrlen = int(input())
arr = [int(x) for x in input().rstrip().split()]
print(*sorted(arr))


n = int(input())
A = [int(k) for k in input().split()]
A.sort()
for i in range(n):
	A[i] = str(A[i])
print(' '.join(A))


n = int(input())
l1 = list(map(int, input().split()))
l1.sort()
print(*l1, sep=' ')


a = int(input(''))
x = input('')
s = x.split(' ')
s = [int(x) for x in s]
s.sort()
y = 0
z = ''
while y < a:
	z += ' ' + str(s[y])
	y += 1
	pass
print(z.strip())


t = 0
n = int(input())
s = input()
f = list(map(int, s.split()))
f.sort()
for i in f:
	print(i, ' ', end='')


import math
import os
import random
import re
from sys import stdin, stdout
from collections import Counter
from itertools import permutations

def si():
	return str(stdin.readline())

def ii():
	return int(stdin.readline())

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

def li():
	return list(mi())

def debug(x):
	return stdout.write(str(x))
n = ii()
arr = li()
arr.sort()
print(' '.join((str(e) for e in arr)))


columns = int(input())
cubes = list(map(int, input().split()))
sortedcubes = list(map(str, sorted(cubes)))
print(' '.join(sortedcubes))


n = int(input())
str = str = input().split(' ')
str.sort(key=int)
for i in range(0, n):
	print(str[i], end=' ')


n = int(input())
a = list(input().split())
b = []
for x in a:
	b.append(int(x))
b.sort()
for c in b:
	print(c, end=' ')


import sys
n = int(input(''))
box = input('').split()
for i in range(n - 1, 0, -1):
	for k in range(i - 1, -1, -1):
		if int(box[k]) > int(box[i]):
			diff = int(box[k]) - int(box[i])
			box[k] = int(box[k]) - diff
			box[i] = int(box[i]) + diff
for i in box:
	sys.stdout.write(str(i) + ' ')


colNum = int(input())
colHigh = list(map(int, input().split()))
colHigh.sort()
print(' '.join(map(str, colHigh)))


import math
num = int(input())
x = input()
lst = x.split()
newlst = list(map(int, lst))
newlst.sort()
for i in newlst:
	print(str(i) + ' ', end='')


from sys import stdin
x = stdin.readline()
y = stdin.readline()
z = y.split()
for i in range(0, int(x)):
	z[i] = int(z[i])
z.sort()
for i in range(0, int(x)):
	z[i] = str(z[i])
w = ' '.join(z)
print(w)


n = int(input())
box = list(map(int, input().split()))
box.sort()
ch = ''
for i in range(n):
	ch += str(box[i]) + ' '
print(ch[:-1])


n = int(input())
list1 = [int(i) for i in input().split()]
list1.sort()
list2 = ''
for i in list1:
	list2 += str(i) + ' '
print(list2)


n = int(input())
mp = map(int, input().split())
dic = {}
c = 0
for x in mp:
	dic[c] = x
	c += 1
z = 0
while z < n:
	for x in range(1, n):
		while dic[x] < dic[x - 1]:
			y = dic[x - 1] - dic[x]
			dic[x] = dic[x] + y
			dic[x - 1] = dic[x - 1] - y
	z += 1
for x in dic.values():
	print(str(x) + ' ', end='')


x = int(input())
y = input().split()
z = len(y)
while z != x:
	y = input().split()
	z = len(y)
y = sorted(y, key=int)
print(' '.join(map(str, y)))


n = int(input())
n_list = sorted(list(map(int, input().split()[:n])))
for res in n_list:
	print(res, '', end='')


n = int(input())
ab = [int(i) for i in input().split()]
c = sorted(ab)
s = ''
i = 0
while i < len(c):
	s = s + str(c[i]) + ' '
	i = i + 1
print(s[0:len(s) - 1])


import sys
count = int(sys.stdin.readline().rstrip())
heights = [int(i) for i in sys.stdin.readline().rstrip().split(' ')]
for i in reversed(range(len(heights))):
	j = i
	while j < len(heights) - 1 and heights[j] > heights[j + 1]:
		diff = heights[j] - heights[j + 1]
		heights[j + 1] += diff
		heights[j] -= diff
		j += 1
for i in heights:
	print(i, end=' ')


n = int(input())
a = input().split()
a = [int(x) for x in a]
b = [str(x) for x in sorted(a)]
answer = str()
for bi in b:
	answer = answer + bi
	if b.index(bi) != n - 1:
		answer = answer + ' '
print(answer)


num = int(input())
lst = sorted(list(map(int, input().split())))
lst = list(map(str, lst))
print(' '.join(lst))


amount = input()
numbers = input()
numbers = list(map(int, numbers.split()))
numbers.sort()
for i in numbers:
	print(i, end=' ')


input()
x = map(str, sorted(map(int, input().split())))
print(' '.join(x))


n = int(input())
ar = [int(i) for i in input().strip().split()]
ar.sort()
for i in range(n):
	print(ar[i], end=' ')


n = int(input())
lista = []
lista = input().split(' ')
list_int = [int(p) for p in lista]
sort_list = sorted(list_int)
for i in sort_list:
	print(i, end=' ')


n = input()
l = [int(i) for i in input().split()]
l.sort()
for i in l:
	print(i)


n = int(input())
arr = [int(x) for x in input().split()]
print(*list(sorted(arr)))


n = int(input())
a = input()
a = a.split()
a = [int(i) for i in a]
a.sort()
x = ''
for i in a:
	x = x + str(i) + ' '
print(x[:len(x)])


n = int(input())
cols = list(map(int, input().split()))
cols.sort()
print(*cols)


import sys

def main():
	n = int(sys.stdin.readline())
	cubes = list(map(int, sys.stdin.readline().split()))
	cubes.sort()
	for i in cubes:
		sys.stdout.write(f'{i} ')
main()


n = input()
print(*sorted(tuple(map(int, input().split()))))


n = int(input())
arr = list(map(int, input().split()))
arr.sort()
print(*arr, end='')


n = int(input())
a = [int(i) for i in input().split(' ', n)]
final = sorted(a)
final = [str('%d' + ' ') % i for i in final]
final = ''.join(final)
print(final)


n = int(input())
lst = input().split()
for m in range(n):
	lst[m] = int(lst[m])
mx = max(lst)
hang = []
for i in range(mx):
	ct = 0
	for j in range(n):
		if lst[j] >= i + 1:
			ct += 1
	hang.append(ct)
z = max(hang)
lie = []
for k in range(z):
	c = 0
	for l in range(len(hang)):
		if hang[l] >= k + 1:
			c += 1
	lie.append(c)
lie.reverse()
print(*lie, sep=' ')


n = eval(input())
cubes = [int(x) for x in input().split()]
cubes.sort()
for i in range(n - 1):
	print(cubes[i], end=' ')
print(cubes[n - 1])


input()
a = sorted([int(x) for x in input().split()])
b = [str(i) for i in a]
print(' '.join(b))


(t, *a) = map(int, open(0).read().split())
print(*sorted(a))


n = int(input())
s = list(map(int, input().split()))[:n]
s.sort()
print(*s, sep=' ')


n = int(input())
x = list(map(int, input().rstrip().split()))
for i in sorted(x):
	print(i, '', end='')
print()


m = []
n = int(input())
s = [int(x) for x in input().split()]
s.sort()
s = [str(x) for x in s]
x = ' '.join(s)
print(x)


import sys
_ = sys.stdin.readline()
boxes = sorted(sys.stdin.readline()[:-1].split(' '), key=int)
print(' '.join(boxes))


col = int(input())
arr = list(map(int, input().split()))
arr.sort()
print(*arr)


n = int(input())
a = [int(i) for i in input().split()]
a.sort()
for i in range(n):
	if i != n - 1:
		print(a[i], end=' ')
	else:
		print(a[i])


input()
heights = [int(h) for h in input().split(' ')]
heights.sort()
print(' '.join((str(h) for h in heights)))


def cal(l):
	l0 = [int(i) for i in l]
	l0.sort()
	l1 = map(str, l0)
	a = ' '.join(l1)
	return a
input()
l = input().split()
print(cal(l))


from sys import stdin

def sort(lis):
	for i in range(len(lis)):
		for j in range(len(lis)):
			if lis[i] < lis[j]:
				(lis[j], lis[i]) = (lis[i], lis[j])
	for k in range(len(lis)):
		lis[k] = str(lis[k])
	print(' '.join(lis))

def main():
	n = int(stdin.readline())
	sort([int(x) for x in stdin.readline().strip().split()])
main()


from sys import stdin

def main():
	a = int(stdin.readline().strip())
	b = [int(x) for x in stdin.readline().strip().split()]
	b.sort()
	ans = ''
	for i in range(a):
		ans += str(b[i]) + ' '
	print(ans[:-1])
main()


input()
cube = sorted(list(map(int, input().split())))
cube = [str(i) for i in cube]
print(' '.join(cube))


columns = int(input())
heights = sorted([int(h) for h in input().split()])
print(' '.join([str(h) for h in heights]))


import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue

class Scanner:

	@staticmethod
	def int():
		return int(sys.stdin.readline().rstrip())

	@staticmethod
	def string():
		return sys.stdin.readline().rstrip()

	@staticmethod
	def map_int():
		return [int(x) for x in Scanner.string().split()]

	@staticmethod
	def string_list(n):
		return [input() for i in range(n)]

	@staticmethod
	def int_list_list(n):
		return [Scanner.map_int() for i in range(n)]

	@staticmethod
	def int_cols_list(n):
		return [int(input()) for i in range(n)]

class Math:

	@staticmethod
	def gcd(a, b):
		if b == 0:
			return a
		return Math.gcd(b, a % b)

	@staticmethod
	def lcm(a, b):
		return a * b // Math.gcd(a, b)

	@staticmethod
	def divisor(n):
		res = []
		i = 1
		for i in range(1, int(n ** 0.5) + 1):
			if n % i == 0:
				res.append(i)
				if i != n // i:
					res.append(n // i)
		return res

	@staticmethod
	def round_up(a, b):
		return -(-a // b)

	@staticmethod
	def is_prime(n):
		if n < 2:
			return False
		if n == 2:
			return True
		if n % 2 == 0:
			return False
		d = int(n ** 0.5) + 1
		for i in range(3, d + 1, 2):
			if n % i == 0:
				return False
		return True

class PriorityQueue:

	def __init__(self, l=[]):
		self.q = l
		heapq.heapify(self.q)
		return

	def push(self, n):
		heapq.heappush(self.q, n)
		return

	def pop(self):
		return heapq.heappop(self.q)
MOD = int(1000000000.0) + 7
INF = int(1000000000000000.0)

def main():
	N = Scanner.int()
	A = Scanner.map_int()
	ans = [0 for _ in range(N)]
	for _ in range(100):
		x = 0
		for i in range(N):
			if A[i] > 0:
				x += 1
				A[i] -= 1
		for i in reversed(range(N - x, N)):
			ans[i] += 1
	print(*ans)
main()


def partition(array, low, high):
	i = low - 1
	pivot = array[high]
	for j in range(low, high):
		if array[j] <= pivot:
			i = i + 1
			(array[i], array[j]) = (array[j], array[i])
	(array[i + 1], array[high]) = (array[high], array[i + 1])
	return i + 1

def quickSort(array, low, high):
	if low < high:
		part = partition(array, low, high)
		quickSort(array, low, part - 1)
		quickSort(array, part + 1, high)
b = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
quickSort(a, 0, len(a) - 1)
for i in a:
	print(i, end=' ')


n = int(input())
arr = list(map(int, input().split()))
for i in range(n - 1, -1, -1):
	for j in range(i - 1, -1, -1):
		if arr[i] < arr[j]:
			c = arr[j] - arr[i]
			arr[i] += c
			arr[j] -= c
for i in range(n):
	print(arr[i], end=' ')


n = int(input())
a = list(map(int, input().strip().split()))[:n]
a.sort()
a = str(a)[1:-1]
print(a.translate({ord(','): None}))


n = int(input())
nl = [int(p) for p in input().split()]
nl.sort()
print(*nl)


a = int(input())
k = list(map(int, input().split()))
k.sort()
k = ' '.join((str(i) for i in k))
print(k)


n = input()
a = [int(x) for x in input().split()]
a.sort()
for el in a:
	print(str(el), end=' ')


n = int(input())
k = [int(i) for i in input().split()]
a = sorted(k)
print(' '.join((str(e) for e in a)))


x = int(input())
y = input().split()
lst = []
for i in range(x):
	z = int(y[i])
	lst.append(z)
lst.sort()
for j in range(len(lst)):
	print(lst[j], end=' ')


n = int(input())
N = [int(num) for num in input().split(' ', n - 1)]
i = 0
N.sort()
while i < n:
	print(N[i], end=' ')
	i += 1


n = int(input())
t = input()
ss = t.split()
s = [int(x) for x in ss]
m = max(s)
count = [0] * (m + 1)
for i in s:
	count[i] += 1
for i in range(m + 1):
	if count[i] > 0:
		print((str(i) + ' ') * count[i], end='')


n = int(input())
m = [int(x) for x in input().split()]
a = sorted(m)
n = []
for i in a:
	n.append(str(i))
print(' '.join(n))


n = int(input())
line = input().split()
line = [int(i) for i in line]
line.sort()
m = ''
for i in range(n):
	m = m + str(line[i]) + ' '
m = m[0:-1]
print(m)


N = int(input())
l = input().split(' ')
l = [int(x) for x in l]
l.sort()
l = [str(x) for x in l]
print(' '.join(l))


n = int(input())
a = input().split()
a = list(map(int, a))
a.sort()
s = ''
for i in range(n):
	s = s + str(a[i]) + ' '
li = list(s)
li.pop()
ss = ''.join(li)
print(ss)


input()
f = sorted(map(int, input().split()))
for i in f:
	print(i, end=' ')


def gravity(col_list):
	moved = False
	for i in range(len(col_list) - 1):
		if col_list[i + 1] < col_list[i]:
			col_diff = col_list[i] - col_list[i + 1]
			col_list[i] -= col_diff
			col_list[i + 1] += col_diff
			moved = True
	return moved
num_cols = int(input())
col_list = [int(s) for s in input().split(' ')]
moved = True
while moved:
	moved = gravity(col_list)
print(' '.join((str(x) for x in col_list)))


t = int(input())
l = list(map(int, input().split()))
l.sort()
for e in l:
	print(e, end=' ')
print()


n = int(input())
a = list(map(int, input().split()))
a.sort()
bo = 1
for i in range(n):
	if bo:
		bo = 0
	else:
		print(' ', end='')
	print(a[i], end='')


n = int(input())
arr = list(map(int, input().split()))
temp = sorted(arr)
if arr == temp:
	print(*arr, sep=' ')
else:
	temp = arr
	temp.reverse()
	for i in range(0, len(temp)):
		for j in range(i + 1, len(temp)):
			if temp[j] <= temp[i]:
				continue
			else:
				x = temp[j] - temp[i]
				temp[i] += x
				temp[j] -= x
	temp.reverse()
	print(*temp, sep=' ')


n_columns = int(input())
columns = input().split(' ')
columns = columns[0:n_columns]
for x in range(len(columns)):
	columns[x] = int(columns[x])
columns.sort()
for x in range(len(columns)):
	columns[x] = str(columns[x])
output = ' '.join(columns)
print(output)


input()

def sort_column(cube):
	for column in range(1, len(cube)):
		hole = column
		while hole > 0 and cube[hole] < cube[hole - 1]:
			(cube[hole], cube[hole - 1]) = (cube[hole - 1], cube[hole])
			hole -= 1
	return cube
sorted_cube = sort_column(list(map(int, input().split())))
for column in sorted_cube:
	print(column, end=' ')


def main():
	n = int(input())
	_ = [int(i) for i in input().split(' ')]
	_.sort()
	print(' '.join(map(str, _)))
main()


n = int(input())
a = [int(x) for x in input().split(sep=' ', maxsplit=n)[:n]]
a.sort()
for ai in a:
	print(ai, end=' ')


t = int(input())
x = list(map(int, input().split()))
x.sort()
print(*x, sep=' ')


n = int(input())
blocks = list(map(int, input().split()))
blocks.sort()
print(*blocks)


n = int(input())
L = list(map(int, input().split()))
L.sort()
print(' '.join(map(str, L)))


numElems = int(input())
heights = [int(x) for x in input().split(' ')]
heights.sort()
heights = [str(x) for x in heights]
outputStr = ' '.join(heights)
print(outputStr)


n = int(input())
vec = input().split(' ')
vec2 = []
for i in range(n):
	vec2.append(int(vec[i]))
vec2.sort()
for x in vec2:
	print(x, end=' ')


N = int(input())
N = list(map(int, input().split()))
N.sort()
print(*N)


n = int(input())
list1 = [int(x) for x in input().split(' ')]
list1.sort()
for i in list1:
	print(i, end=' ')


n = int(input())
s = list(input().split())
for i in range(0, n):
	s[i] = int(s[i])
s = s[::-1]
for i in range(0, n - 1):
	for j in range(i + 1, n):
		if s[i] < s[j]:
			(s[i], s[j]) = (s[j], s[i])
s = s[::-1]
for i in range(0, n):
	print(s[i], end=' ')


def lst2str(lst):
	s = [str(i) for i in lst]
	res = ' '.join(s)
	return res
n = int(input())
num_pieces = list(map(int, input().split()))
num_pieces.sort()
new_lst = lst2str(num_pieces)
print(new_lst)


n = int(input())
while n < 1 or n > 100:
	n = int(input())
a = input().split()
a = [int(i) for i in a]
while len(a) != n:
	a = input().split()
	a = [int(i) for i in a]
a.sort()
for i in a:
	print(i, end=' ')


n = int(input())
l = list(map(int, input().split()))
l.sort()
S = [str(l[i]) for i in range(n)]
print(' '.join(S))


N = int(input())
arr = list(map(int, input().split()))
arr.sort()
for x in arr:
	print(x, end=' ')


n = int(input())
l = list(map(int, input().split()))
temp = sorted(l)
for i in temp:
	print(i, end=' ')


n = int(input())
cols = list(map(int, input().split(' ')))
result = sorted(cols)
print(*result, sep=' ')


n = int(input())
k = input().split()
result = []
for i in k:
	result.append(int(i))
m = sorted(result)
for i in m:
	print(i, end=' ')


n = int(input())
l = [int(i) for i in input().split()]
l.sort()
t = [str(i) for i in l]
print(' '.join(t))


n = int(input())
a = [0] * n
a = map(int, input().split())
for x in sorted(a):
	print(x, end=' ')


n = int(input())
col = list(map(int, input().split()))
col.sort()
s = ' '.join((str(i) for i in col))
print(s)


n = int(input())
L = input().split()
for i in range(n):
	L[i] = int(L[i])
S = sorted(L)
for i in range(n):
	print(S[i], end=' ')


n = int(input())
a = [int(i) for i in input().strip().split(' ')]
a.sort()
print(*a)


n = int(input().strip())
cs = [int(x) for x in input().split()]
cs.sort()
print(' '.join(list(map(lambda x: str(x), cs))).strip())


import sys
n = int(input())
A = list(map(int, input().split()))
cnt = [0] * 110
for i in A:
	for j in range(0, i):
		cnt[j] += 1
pos = 0
for i in range(n):
	while cnt[pos + 1] == n - i:
		pos += 1
	sys.stdout.write('%d ' % (pos + 1))


columns = input()
numbers = input().split()
numbers = [int(x) for x in numbers]
max = numbers[0]
min = numbers[0]
for x in numbers:
	if x > max:
		max = x
	if x < min:
		min = x
ar = [0] * (max + 1)
for x in numbers:
	ar[x] += 1
for x in range(min, len(ar) + 1):
	for y in range(ar[x - 1]):
		print(str(x - 1) + ' ', end='')


n = int(input())
b = str(' ')
a = [int(n) for n in input().split(' ')]
a = sorted(a)
for i in range(len(a)):
	b = b + ' ' + str(a[i])
print(b[2:])


import sys
c = 0
for linea in sys.stdin.readlines():
	if c == 0:
		n = int(linea.strip('\n'))
	else:
		otra = [int(i) for i in linea.strip('\n').split(' ')]
	c += 1
lista = []
for i in range(n):
	lista.insert(0, str(max(otra)))
	otra.remove(max(otra))
st = ' '.join(lista)
print(st)


n = int(input())
coluna = [int(x) for x in input().split()]
while True:
	colunasFaltando = 0
	for i in range(n - 1, -1, -1):
		if i != 0:
			if coluna[i] < coluna[i - 1]:
				colunasFaltando += 1
				dif = abs(coluna[i] - coluna[i - 1])
				coluna[i] += dif
				coluna[i - 1] -= dif
	if colunasFaltando == 0:
		break
s = ''
for e in coluna:
	s += str(e) + ' '
print(s[:len(s) - 1])


n = int(input())
a = list(map(int, input().split()))
a.sort()
for ai in a:
	print(ai, end=' ')


def solve(n, values):
	cache = [0] * max(values)
	result = []
	for v in values:
		cache[v - 1] += 1
	for (i, v) in enumerate(cache):
		for _ in range(v):
			result.append(i + 1)
	return ' '.join(map(lambda x: str(x), result))
(n,) = tuple(map(int, input().split()))
values = list(map(int, input().split()))
print(solve(n, values))


column = input()
boxes = input()
final = sorted((int(i) for i in boxes.split(' ')))
print(''.join((str(i) + ' ' for i in final)))


while True:
	n = int(input())
	if n >= 1 and n <= 100:
		break
a = input().split(' ')
liste = []
for i in range(n):
	liste.append(int(a[i]))
liste = sorted(liste)
for i in range(n):
	print(liste[i], end=' ')


from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def powmod(a, b):
	a %= mod
	if a == 0:
		return 0
	res = 1
	while b > 0:
		if b & 1:
			res = res * a % mod
		a = a * a % mod
		b >>= 1
	return res

def main():
	n = ii()
	a = li()
	a.sort()
	print(*a)
main()


l = int(input())
arr = list(map(int, input().split()))
for i in sorted(arr):
	print(i, end=' ')


n = int(input())
l = input().split(' ')
l1 = []
for el in l:
	l1.append(int(el))
l1.sort()
del l
for i in l1:
	print(i, end=' ')


x = int(input(''))
y = input('')
s = y.split(' ')
s = [int(y) for y in s]
s.sort()
j = 0
r = ''
while j < x:
	r += ' ' + str(s[j])
	j += 1
	pass
print(r.strip())


from sys import stdin

def main():
	stdin.readline()
	a = [int(x) for x in stdin.readline().strip().split()]
	a.sort()
	a = [str(x) for x in a]
	print(' '.join(a).strip())
main()


n = int(input())
gravity = []
gravity.append(input().split())
new_gravity = []
for i in gravity[0]:
	new_gravity.append(int(i))
new_gravity.sort()
for j in new_gravity:
	print(j, end=' ')


a = int(input(''))
b = input('')
c = b.split(' ')
c = [int(b) for b in c]
c.sort()
j = 0
r = ''
while j < a:
	r += ' ' + str(c[j])
	j += 1
	pass
print(r.strip())


n = int(input())
s = input().split()[:n]
s = [int(i) for i in s]
s.sort()
print(*s)


t = int(input())
arr = sorted([int(x) for x in input().split()])
for each in arr:
	(print(each, end=' '),)


numCol = input()
arr = input().split(' ')
arr = [int(num) for num in arr]
size = len(arr)
if size == 1:
	print(arr[0])
else:
	index = size - 2
	second = index
	while second >= 0:
		index = size - 2
		while index >= 0:
			if arr[index] > arr[index + 1]:
				diff = arr[index] - arr[index + 1]
				arr[index + 1] += diff
				arr[index] -= diff
			index -= 1
		second -= 1
	for x in arr:
		print(x, end=' ')


num_col = int(input())
boxes = input().split()
for i in range(len(boxes)):
	boxes[i] = int(boxes[i])
boxes.sort()
for i in boxes:
	print(i, end=' ')


length = input()
user_input = input()
user_input = user_input.split()
for i in range(len(user_input)):
	user_input[i] = int(user_input[i])
user_input.sort()
string = ''
for i in range(len(user_input)):
	string += str(user_input[i]) + ' '
print(string[:-1])


num = int(input())
inp = list(map(int, input().split()))
while inp != []:
	ran = len(inp)
	for i in range(ran):
		if inp[i] == min(inp):
			print(inp[i], end=' ')
			break
	inp.remove(min(inp))


input()
l = [int(x) for x in input().split()]
l.sort()
print(*l)


n = int(input())
arr = list(map(int, input().split()))

def partition(arr, low, high):
	i = low - 1
	pivot = arr[high]
	for j in range(low, high):
		if arr[j] <= pivot:
			i = i + 1
			(arr[i], arr[j]) = (arr[j], arr[i])
	(arr[i + 1], arr[high]) = (arr[high], arr[i + 1])
	return i + 1

def quick_sort(arr, low, high):
	if low < high:
		p_i = partition(arr, low, high)
		quick_sort(arr, low, p_i - 1)
		quick_sort(arr, p_i + 1, high)
n = len(arr)
quick_sort(arr, 0, n - 1)
for number in arr:
	print(number, end=' ')


n = input()
col = input().split()
n = int(n)
i = 0
while i < len(col):
	col[i] = int(col[i])
	i += 1
col.sort()
print(*col)


length = int(input())
nums = [int(i) for i in str(input()).split(' ')]
nums.sort()
for i in nums:
	print(i, end=' ')


n = int(input())
a = []
a[:n - 1] = input().split()
a.sort(key=int)
print(' '.join(a))


n = int(input())
a = input().split()
b = []
for i in range(n):
	b.append(int(a[i]))
b.sort()
print(' '.join((str(i) for i in b)))


N = int(input())
M = input().split()
S = [int(i) for i in M]
S.sort()
for i in S:
	print(int(i), end=' ')


c = int(input())
a = list(map(int, input().split(' ')))
a.sort()
ans = ' '.join((str(i) for i in a))
print(ans)


n = int(input())
l = list(map(int, input().rstrip().split()))
k = sorted(l)
for i in range(len(l)):
	print(k[i], end=' ')


import sys, os.path
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
sys.setrecursionlimit(10 ** 5)

def i():
	return sys.stdin.readline().strip()

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

def li():
	return list(sys.stdin.readline().strip())

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

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

def solve():
	a = ii()
	b = sorted(lii())
	print(*b, end=' ')
solve()


n_columnas = int(input())
cubos = input()
cubos = list(cubos.rsplit(' '))
for i in range(n_columnas):
	cubos[i] = int(cubos[i])
cubos.sort()
string = ''
for i in cubos:
	string += str(i) + ' '
print(string)


k = int(input())
l = list(map(int, input().strip().split()))[:k]
l.sort()
for i in l:
	print(i, end=' ')


n = int(input())
x = [int(i) for i in input().split()]
x.sort()
for i in x:
	if i > 0:
		print(i, end=' ')


n = int(input())
cubes = list(map(int, input().split(' ')))
cubes.sort()
cubes = list(map(str, cubes))
print(' '.join(cubes))


n = int(input())
a = list(map(int, input().strip().split()))
a.sort()
print(*a)


n = int(input())
a = list(map(int, input().split()))
m = max(a)
msk = [[0] * n for rw in range(m)]
for (ind, vl) in enumerate(a):
	for j in range(vl):
		msk[j][ind] = 1
msk = msk[::-1]
msk_gr = []
for rw in msk:
	k = sum(rw)
	rw1 = [0] * n
	rw1[-k:] = [1] * k
	msk_gr.append(rw1)
print(' '.join(map(str, [sum([msk_gr[i][j] for i in range(m)]) for j in range(n)])))


n = int(input())
L = [int(i) for i in input().split()]
L2 = []
i = 0
while i < n:
	L2.append(min(L))
	L.pop(L.index(min(L)))
	i += 1
string = ' '.join((str(x) for x in L2))
print(string)


n = int(input())
D = list(map(int, input().split(' ')))
D.sort()
print(' '.join(map(str, D)))


n = int(input())
a = [int(c) for c in input().split(' ')]
a.sort()
for (ind, col) in enumerate(a):
	if ind == n - 1:
		print(col, end='')
	else:
		print(col, end=' ')


b = int(input())
c = str(input())
a = c.split(' ')
j = 0
for i in a:
	a[j] = int(i)
	j += 1
a.sort()
j = 0
for i in a:
	a[j] = str(i)
	j += 1
astr = ' '.join(a)
print(astr)


n = input()
array = input()
ordered = sorted(list(map(int, array.split(' '))))
print(' '.join(map(str, ordered)))


n = int(input())
res = sorted([int(x) for x in input().split()])
for i in res:
	print(i, end=' ')


n = input()
alist = (int(x) for x in input().split())
alist = sorted(alist)
alist = (str(x) for x in alist)
alist = ' '.join(alist)
print(alist)


def main():
	num = int(input())
	x = map(int, input().split())
	arr = []
	for i in x:
		arr.append(i)
	arr.sort()
	for i in range(num):
		(print(arr[i]),)
main()


n = int(input())
columns = [int(i) for i in input().split()]
csorted = sorted(columns)
printout = []
for i in csorted:
	printout = printout + [str(i)]
print(' '.join(printout))


while True:
	try:
		n = int(input())
		l = list(map(int, input().split()))
		l.sort()
		for i in range(n):
			l[i] = str(l[i])
		print(' '.join(l))
	except EOFError:
		break


num = input()
cubes = list(map(int, input().split(' ')))
cubes.sort()
cubes = list(map(str, cubes))
print(' '.join(cubes))


n = int(input())
ip = input().split(' ')
for x in range(n):
	ip[x] = int(ip[x])
ip = sorted(ip)
res = ''
for x in range(n):
	if x < n - 1:
		res = res + str(ip[x]) + ' '
	else:
		res += str(ip[x])
print(res)


columns = int(input())
string = input()
numbers = string.split(' ')
for x in range(len(numbers)):
	temp = numbers[x]
	del numbers[x]
	numbers.insert(x, int(temp))
if columns > max(numbers):
	max1 = columns
else:
	max1 = max(numbers)
for x in range(2):
	templist = []
	for y in range(max1):
		n = 0
		for z in range(len(numbers)):
			if numbers[z]:
				n += 1
				temp = numbers[z]
				del numbers[z]
				numbers.insert(z, temp - 1)
		templist.append(n)
	numbers = templist
string = ''
for x in range(len(numbers) - 1, -1, -1):
	if numbers[x] != 0:
		string += str(numbers[x]) + ' '
print(string)


(n, int_cubes) = [list(map(int, input().split())) for _ in range(2)]
str_cubes = [str(i) for i in sorted(int_cubes)]
print(' '.join(str_cubes))


t = int(input())
a = list(map(int, input().split()))
a.sort()
a = list(map(str, a))
print(' '.join(a))


n = int(input())
a = []
for i in range(0, n):
	a.append(0)
a = input().split()
for i in range(0, n):
	a[i] = int(a[i])
for i in range(0, n):
	for j in range(i, n):
		if a[i] > a[j]:
			(a[i], a[j]) = (a[j], a[i])
for i in range(0, n):
	print(a[i], end=' ')


n = int(input())
arr = [int(i) for i in input().split()]
arr.sort()
print(' '.join(map(str, arr)))


__author__ = 'dougct'

def main():
	n = int(input())
	cubes = list(map(int, input().split()))
	cubes.sort()
	print(*cubes)
main()


n = int(input())
list = [int(x) for x in input().split()]
list.sort()
for x in range(len(list)):
	print(list[x], end=' ')


n = int(input())
lst = input().split()
for i in range(n):
	lst[i] = int(lst[i])
lst.sort()
for i in lst:
	print(i, end=' ')


n = int(input())
l = list()
temp = input()
l.extend(temp.split())
for i in range(n):
	l[i] = int(l[i])
for i in sorted(l):
	print(i, ' ', end='')


import math
n = int(input())
a = list(map(int, input().split()))
a.sort()
print(' '.join([str(_) for _ in a]))


columns_count = int(input())
columns = sorted([int(x) for x in input().split()])
print(' '.join([str(x) for x in columns]))


import sys
n = int(sys.stdin.readline())
in_str = [int(x) for x in sys.stdin.readline().split()]
in_str.sort()
out = [str(x) for x in in_str]
print(' '.join(out))


n = int(input())
massif = [int(a) for a in input().split()]
massif.sort()
for a in massif:
	print(a, end=' ')


n = int(input())
blocks = list(map(int, input().split()))
print(*sorted(blocks))


def main():
	input_size = int(input())
	box = []
	for cubes in input().split(' '):
		box.append(int(cubes))
	box.sort()
	result = ' '.join((str(stack) for stack in box))
	print(result)
main()


col = int(input())
n = input().split()
n.sort(key=int)
print(' '.join(n))


_ = input()
arr = map(int, input().split())
print(*sorted(arr))


n = int(input())
a = list(map(int, input().split()))
result = []
for i in range(len(a)):
	min1 = min(a)
	result.append(min1)
	a.remove(min1)
print(*result)


n = int(input())
v = [int(x) for x in input().split()]
v.sort()
print(' '.join(map(str, v)))


numberOfColumns = input()
columnCubes = input()
columnCubes = columnCubes.split(' ')
for i in range(len(columnCubes)):
	columnCubes[i] = int(columnCubes[i])
columnCubes.sort()
printOutput = ''
for item in columnCubes:
	printOutput += str(item) + ' '
print(printOutput)


from sys import stdin, stdout
n = int(stdin.readline())
a = list(map(int, stdin.readline().split()))
a.sort()
print(*a)


input()
v = sorted([int(e) for e in input().split()])
print(' '.join([str(e) for e in v]))


n = int(input())
s = input().split()
for i in range(n - 1):
	for j in range(n - i - 1):
		if int(s[j]) > int(s[j + 1]):
			temp = s[j]
			s[j] = s[j + 1]
			s[j + 1] = temp
print(' '.join(s))


n = int(input())
m = input().split()
l = []
for i in m:
	l.append(int(i))
l.sort()
for i in l:
	print(i, end=' ')


n = int(input())
l = []
l2 = []
x = [int(x) for x in input().split()]
l.append(x)
for i in l:
	for j in i:
		l2.append(j)
l2.sort()
for i in l2:
	print(i, '', end='')


b = int(input())
a = [int(i) for i in input().split()]
d = 0
for i in range(len(a)):
	c = 0
	for j in range(len(a) - i):
		if a[j] > c:
			c = a[j]
			x = j
	z = a[len(a) - 1 - i]
	a[len(a) - 1 - i] = c
	a[x] = z
for s in range(len(a)):
	print(a[s], end=' ')


number = input()
str1 = input()
List = str1.split(' ')
for i in range(len(List)):
	List[i] = int(List[i])
List.sort()
for i in range(len(List)):
	List[i] = str(List[i])
print(' '.join(List))


n = int(input())
num = [int(i) for i in input().split()]
m = max(num)
b = (m + 1) * [0]
for i in range(0, n):
	a = num[i]
	for j in range(1, a + 1):
		b[j] += 1
for k in range(1, m):
	print((b[k] - b[k + 1]) * (str(k) + ' '), end='')
print(b[m] * (str(m) + ' '))


n = int(input())
nums = [int(x) for x in input().split()]
nums.sort()
print(*nums)


nums = int(input())
cols = [int(x) for x in input().split()]
cols.sort()
print(' '.join((str(num) for num in cols)))


n = int(input())
l = list(map(int, input().split()))
for i in range(n):
	for j in range(len(l) - 1):
		if l[j] > l[j + 1]:
			(l[j], l[j + 1]) = (l[j + 1], l[j])
s = ''
for i in l:
	s += ' ' + str(i)
print(s[1:])


def gravity_flip(m):
	return [str(i) for i in sorted(m)]
n = int(input())
a = list(map(int, input().split()))
print(' '.join(gravity_flip(a)))


n = int(input())
m = list(map(int, input().split()))
for i in range(n):
	for j in range(i + 1, n):
		if m[i] > m[j]:
			(m[i], m[j]) = (m[j], m[i])
print(*m)


n = int(input())
line = input()
a = line.split()
for i in range(n):
	a[i] = int(a[i])
for i in range(n - 1, 0, -1):
	for j in range(i - 1, -1, -1):
		if a[j] > a[i]:
			temp = a[j] - a[i]
			a[i] = a[i] + temp
			a[j] = a[j] - temp
for i in range(n):
	print(a[i], end=' ')


n = int(input())
num = [int(x) for x in input().split()]
num1 = sorted(num)
print(*num1)


n = int(input())
x = [int(i) for i in input().split()]
x.sort()
s = ''
for i in range(len(x)):
	s += str(x[i])
	if i < len(x) - 1:
		s += ' '
print(s)


q = input()
blocks = [int(i) for i in input().split()]
blocks = sorted(blocks)
blocks = [str(i) for i in blocks]
answer = ' '.join(blocks)
print(answer)


a = int(input())
arr = list(map(int, input().split(' ')))
arr.sort()
i = -1
for i in range(0, a - 1):
	print(arr[i], end=' ')
print(arr[i + 1])


input()
arr = input().split()
arr = [int(i) for i in arr]
arr.sort()
for j in arr:
	print(j, end=' ')


n = int(input())
k = list(map(int, input().split()))
p = [0] * 101
for i in k:
	p[i] += 1
for i in range(101):
	if p[i] > 0:
		print((str(i) + ' ') * p[i], end='')


import collections
import heapq
from bisect import bisect_right
import math
n = int(input())
a = [int(x) for x in input().split()]
a.sort()
for j in a:
	print(j, end=' ')


n = int(input())
a = input().split(' ')
int_a = [int(i) for i in a]
s_int_a = sorted(int_a)
str_s_int_a = [str(i) for i in s_int_a]
print(' '.join(str_s_int_a))


n = int(input())
A = input().split()
S = [int(i) for i in A]
S.sort()
for i in S:
	print(int(i), end=' ')


n = int(input())
blocks = list(map(int, input().split()))
blocks.sort()
for b in blocks:
	print(str(b) + ' ')


_ = input()
cols = [int(x) for x in input().split()]
cols.sort()
for x in cols:
	print(x, end=' ')


n = int(input())
l = input().split()
ans = []
for a in range(0, n):
	for j in range(0, n - a - 1):
		if int(l[j]) > int(l[j + 1]):
			(l[j], l[j + 1]) = (l[j + 1], l[j])
for i in l:
	print(i, end=' ')


x = int(input())
res = input().split()
res = [int(i) for i in res]
res.sort()
for i in res:
	print(i, ' ', end='')


get = int(input())
inp = str(input())
x = 0
data = inp.split(' ')
if get == len(data):
	sort = sorted(data, key=int)
	for i in range(len(sort)):
		print(sort[i], end=' ')


input()
i = list(map(int, input().split()))
i.sort()
for j in i:
	print(j)


def solve(n, a):
	a.sort()
	return ' '.join(map(str, a))

def main():
	n = int(input())
	a = list(map(int, input().split()))
	print(solve(n, a))
main()


n = input()
S = [int(t) for t in input().split()]
S.sort()
M = [str(x) for x in S]
print(' '.join(M))


n = int(input())
k = list(map(int, input().split()))
k = sorted(k)
print(' '.join(map(str, k)))


n = int(input())
a = input().split(' ')
b = []
for i in range(n):
	b.append(int(a[i]))
b.sort()
for j in b:
	print(j, end=' ')


length = int(input())
numbers = [int(i) for i in input().split()]
numbers.sort()
for x in numbers:
	print(x, end=' ')


n = int(input())
num = input()
arr = []
count = 0
for i in range(0, len(num)):
	if num[i] == ' ':
		arr.append(int(num[count:i]))
		count = i + 1
	elif i == len(num) - 1:
		arr.append(int(num[count:len(num)]))
arr.sort()
result = ''
for i in arr:
	result += str(i) + ' '
print(result)


n = int(input())
a = [int(i) for i in input().split()]
m = max(a)
b = [0] * m
for i in range(m):
	b[i] = [0] * n
for i in range(len(a)):
	for j in range(a[i]):
		b[m - 1 - j][i] = 1
for j in range(m):
	b[j].sort()
a = []
for j in range(n):
	sum = 0
	for i in range(m):
		sum += b[i][j]
	a.append(sum)
print(' '.join([str(i) for i in a]))


from sys import stdin
n = int(stdin.readline().rstrip())
block_heights = sorted([int(x) for x in stdin.read().rstrip().split()])
print(' '.join([str(x) for x in block_heights]))


n = int(input())
thing = list(map(int, input().split()))
thing.sort()
thing = list(map(str, thing))
print(' '.join(thing))


n = int(input())
s = list(map(int, input().split()))
m = max(s)
k = 0
s1 = []
t1 = []
sp = []
p = n
for i in range(n):
	k = 1
	for j in range(m):
		if k <= s[i]:
			t1.append(1)
			k += 1
		else:
			t1.append(0)
			k += 1
	t2 = t1[:]
	s1.append(t2)
	t1.clear()
for j in range(m):
	for i in range(0, n):
		t1.append(s1[i][j])
	t2 = t1[:]
	sp.append(t2)
	t1.clear()
for i in range(m):
	sp[i].sort()
s1.clear()
for j in range(n):
	for i in range(m):
		t1.append(sp[i][j])
	t2 = t1[:]
	s1.append(t2)
	t1.clear()
for i in range(p):
	print(s1[i].count(1), end=' ')


n = int(input())
m = sorted([int(x) for x in input().split()])
p = [str(x) for x in m]
print(' '.join(p))


def Insertion(first, second):
	lista = second.strip('\n').split(' ')
	for i in range(1, len(lista)):
		aux = int(lista[i])
		j = i
		while j > 0 and aux < int(lista[j - 1]):
			lista[j] = int(lista[j - 1])
			j -= 1
		lista[j] = int(aux)
	lista = [str(lista[i]) for i in range(len(lista))]
	third = ' '.join(lista)
	return third
print(Insertion(input(), input()))


n = int(input())
lst = list(map(int, input().split()))
lst.sort()
print(' '.join(map(str, lst)))


import sys
input = sys.stdin.readline()
input = sys.stdin.readline().strip()
array_nums = input.split(' ')
array_nums = list(map(int, array_nums))
array_nums.sort()
print(' '.join((str(x) for x in array_nums)))


input()
arr = input().split()
arr = list(map(int, arr))
arr.sort()
output = ''
for a in arr:
	output += str(a) + ' '
print(output[0:len(output) - 1])


n = int(input())
l1 = [int(i) for i in input().split(' ')]
l1 = sorted(l1)
for i in l1:
	print(i, end=' ')


a = int(input())
b = [int(i) for i in input().split()]
b.sort(reverse=False)
b = [str(i) for i in b]
k = ' '
print(k.join(b))


n = int(input())
x = [int(i) for i in input().split(' ')]
y = sorted(x)
s = ''
for i in range(len(y)):
	s += str(y[i]) + ' '
print(s[0:len(s) - 1])


num_entrada = int(input())
entrada = [int(x) for x in input().split()]
entrada.sort()
for i in range(num_entrada):
	print(entrada[i], end=' ')


n = input()
a = [int(i) for i in input().split()]
b = []
b = a.sort()
print(*a)


from sys import stdin

def gravedad(c):
	for a in range(1, len(c)):
		for p in range(len(c) - a):
			if c[p] > c[p + 1]:
				(c[p], c[p + 1]) = (c[p + 1], c[p])
	for k in c:
		print(k, end=' ')

def main():
	x = int(stdin.readline().strip())
	c = [int(i) for i in stdin.readline().strip().split()]
	gravedad(c)
main()


cols = int(input())
nums = [int(i) for i in input().split()]
nums = sorted(nums)
out = ''
for num in nums:
	out = out + str(num) + ' '
print(out[:-1])


input()
print(' '.join((str(y) for y in sorted([int(x) for x in input().split()]))))


number_of_columns = int(input())
number_of_cubes = list(map(int, input().split()))
number_of_cubes.sort()
print(' '.join(map(str, number_of_cubes)))


n = int(input())
c = [int(i) for i in input().split()]
while True:
	m = 0
	for i in range(n - 1):
		if c[i] > c[i + 1]:
			(c[i], c[i + 1]) = (c[i + 1], c[i])
			m = 1
	if m == 0:
		break
print(*c)


n = int(input())
a = map(int, input().split())
s = list(a)
s.sort()
for i in range(n):
	print('{}'.format(s[i]), end=' ')


input()
blocks = sorted(list(map(int, input().split())))
for i in range(len(blocks)):
	print(blocks[i], end=' ')


n = int(input())
initial = [int(x) for x in input().split()]
initial.sort()
for cubes in initial:
	print(cubes, end=' ')


input()
m = [int(x) for x in input().split()]
m.sort()
m = [str(x) for x in m]
print(' '.join(m))


cols = int(input())
cs = input().split()
cubes = []
for cube in cs:
	cubes.append(int(cube))
cubes.sort()
string = str(cubes[0])
for c in cubes[1:]:
	string += ' ' + str(c)
print(string)


n = int(input())
box = input()
box = box.split()
for i in range(len(box)):
	box[i] = int(box[i])
box.sort()
out = str(box[0])
for i in range(1, len(box)):
	out = out + ' ' + str(box[i])
print(out)


n = int(input())
list1 = list(map(int, input().split()))
list2 = sorted(list1)
print(*list2)


l = int(input())
A = list(map(int, input().split()))
B = []
for i in range(max(A)):
	a = 0
	for x in range(l):
		if A[x] > i:
			a += 1
	B.append(str(a))
C = []
for x in range(l):
	b = 0
	for i in range(max(A)):
		if int(B[i]) >= l - x:
			b += 1
	C.append(str(b))
print(' '.join(C))


a = input()
b = list(map(int, input().split()))
b = sorted(b)
for i in b:
	print(i)


col = int(input())
li = [int(a) for a in input().split(' ')]
li = sorted(li)
for i in li:
	print(i, end=' ')


import math
numCols = int(input())
heights = [int(x) for x in input().split()]
heights.sort()
for height in heights:
	print(height)


num = int(input())
a = list(map(int, input().split()))
a.sort()
print(' '.join(map(str, a)))


_ = input()
l = [int(n) for n in input().split(' ')]
print(' '.join([str(n) for n in sorted(l)]))


input()
a = list(map(str, sorted(list(map(int, input().split())))))
for i in range(len(a)):
	a[i] = a[i].ljust(len(a[i]) + 1)
print(''.join(a).rstrip())


n = int(input())
a = list(map(int, input().split(' ')))
m = max(a)
w = [0] * m
r = [0] * n
for i in range(m):
	for j in range(n):
		if a[j] >= i + 1:
			w[i] += 1
for j in range(n):
	for i in range(m):
		if w[i] > n - (j + 1):
			r[j] += 1
res = [str(i) for i in r]
res = ' '.join(res)
print(res)


from heapq import heappush, heappop

def int_raw():
	return int(input())

def ss_raw():
	return input().split()

def ints_raw():
	return list(map(int, input().split()))
N = int_raw()

def main():
	AS = ints_raw()
	AS.sort()
	return ' '.join(map(str, AS[:N]))
print(main())


n = input()
line = input()
columns = []
for val in line.split():
	columns.append(int(val))
sortedColumns = sorted(columns)
for number in sortedColumns:
	print(number)


n = int(input())
colunas = list(map(int, input().split()))
colunas.sort()
for n in colunas:
	print(f'{n} ', end='')


n = int(input())
m = [int(x) for x in input().split()]
m.sort()
t = [str(x) for x in m]
y = ' '.join(t)
print(y)


def find(arr):
	low = arr[0]
	index = 0
	for i in range(len(arr)):
		if arr[i] < low:
			low = arr[i]
			index = i
	return index

def selection_sort(arr):
	l = []
	for i in range(len(arr)):
		l.append(arr.pop(find(arr)))
	return l
x = int(input())
z = input().split()
for i in range(len(z)):
	z[i] = int(z[i])
newarr = selection_sort(z)
for i in newarr:
	print(i, ' ', end='')


x = eval(input())
n = input().split(' ')
i = 0
l = []
while i < len(n):
	l = l + [int(n[i])]
	i = i + 1
l.sort()
r = ''
i = 0
while i < len(l):
	if i < len(l) - 1:
		r = r + str(l[i]) + ' '
	else:
		r = r + str(l[i])
	i = i + 1
print(r)


a = int(input())
t = input().split()
n = []
for i in range(a):
	n.append(int(t[i]))
n.sort()
n = map(str, n)
print(' '.join(n))


columns = int(input())
caixas = list(map(int, input().split(' ')))
print(' '.join(map(str, sorted(caixas))))


def selectionSort(alist):
	for i in range(len(alist) - 1, 0, -1):
		positionOfMax = 0
		for location in range(1, i + 1):
			if alist[location] > alist[positionOfMax]:
				positionOfMax = location
		temp = alist[i]
		alist[i] = alist[positionOfMax]
		alist[positionOfMax] = temp
a = input()
n = input()
coins = list(map(int, n.split(' ')))
selectionSort(coins)
s = ' '.join(map(str, coins))
print(s)


n = int(input())
number = input()
N = number.split()
L = []
X = []
for i in range(0, n):
	L.append(int(N[i]))
Y = sorted(L)
for t in range(0, n):
	X.append(str(Y[t]))
print(' '.join(X))


columnas = int(input())
caja = [int(x) for x in input().split(' ')]
caja.sort()
print(' '.join([str(x) for x in caja]))


n = int(input())
print(*sorted([int(i) for i in input().split()]), sep=' ')


n = int(input())
l = list(map(int, input().strip().split()))
l.sort()
print(' '.join([str(x) for x in l]))


def bubbleSort(myList):
	for long in range(len(myList) - 1, 0, -1):
		for i in range(0, long):
			if myList[i] > myList[i + 1]:
				temp = myList[i]
				myList[i] = myList[i + 1]
				myList[i + 1] = temp

def printList(myList):
	for i in range(0, len(myList)):
		print(myList[i], end=' ')
	print()
myList = []
n = int(input())
number = input().split(' ')
for i in range(0, n):
	myList.append(int(number[i]))
bubbleSort(myList)
printList(myList)


n = int(input())
ar = [int(i) for i in input().split()]
ar.sort()
print(' '.join((str(i) for i in ar)))


lenn = int(input())
inp = input()
box = []
strr = ''
for i in inp:
	if i == ' ':
		box.append(int(strr))
		strr = ''
	else:
		strr += i
box.append(int(strr))
moves = 1
while moves > 0:
	moves = 0
	for i in range(lenn - 1, 0, -1):
		summ = box[i - 1] - box[i]
		if summ > 0:
			moves += 1
			box[i] += summ
			box[i - 1] -= summ
for i in range(lenn - 1):
	print(box[i], end=' ')
print(box[lenn - 1])


n = int(input())
a = input().split()
for i in range(len(a)):
	a[i] = int(a[i])
print(' '.join(map(str, sorted(a))))


from sys import stdin
column_num = stdin.readline()
pre_order = stdin.readline()
pre_order_list = pre_order.split()
pre_order_list = [int(num) for num in pre_order_list]
order_list = sorted(pre_order_list)
result = ''
for num in order_list:
	result += ' ' + str(num)
print(result[1:])


n = int(input())
s = input()
columns = list(map(int, s.split()))
for i in range(0, n):
	for j in range(i + 1, n):
		if columns[i] > columns[j]:
			temp = columns[j]
			columns[j] = columns[i]
			columns[i] = temp
print(' '.join([str(x) for x in columns]))


n = int(input())
lis = input().split()
for i in range(n):
	lis[i] = int(lis[i])
lis.sort()
for i in range(n):
	print(lis[i], end=' ')


cols = eval(input())
nums = [int(x) for x in input().split(' ')]
gflipped_nums = sorted(nums)
print(' '.join([str(x) for x in gflipped_nums]))


k = int(input())
lis = input().split()
for i in range(0, k):
	lis[i] = int(lis[i])
lis.sort()
for i in range(0, k):
	print(lis[i], end=' ')


n = input()
l = list(map(int, input().split()))
for each_element in range(len(l) - 1, 0, -1):
	for each_left_element in range(each_element - 1, -1, -1):
		if l[each_left_element] > l[each_element]:
			temp = l[each_left_element] - l[each_element]
			l[each_left_element] = l[each_element]
			l[each_element] += temp
print(*l)


n = int(input())
str1 = input()
list1 = [int(k) for k in str1.split()]
list1.sort()
list2 = [str(k) for k in list1]
print(' '.join(list2))


n = int(input())
m = list(map(int, input().split()))
result = sorted(m)
res = ' '.join(map(str, result))
print(res)


n = int(input())
l1 = [int(o) for o in input().split()]
q = 1
w = 1
e = 0
y = 0
m = 0
l2 = []
maxl1 = max(l1)
while w <= maxl1:
	for x in range(n):
		if l1[x] >= w:
			e += 1
	l2.append(e)
	e = 0
	w += 1
r = n
l3 = []
while r >= 1:
	for v in range(maxl1):
		if l2[v] >= r:
			y += 1
	l3.append(y)
	y = 0
	r -= 1
q = '1'
for x in l3:
	q = q + ' ' + str(x)
print(q[2:])


n = input()
s = list(map(int, input().split()))
s = sorted(s)
l = ''
for i in s:
	l = l + ' ' + str(i)
print(l.rstrip().lstrip())


def main():
	n = int(input())
	ai = [int(x) for x in input().split()]
	for i in range(n - 2, -1, -1):
		for j in range(1, ai[i] + 1):
			x = j
			adv = 0
			for k in range(i + 1, n):
				if x > ai[k]:
					adv += 1
			if adv != 0:
				ai[i + adv] += 1
				ai[i] -= 1
	for c in ai:
		print(c, end=' ')
main()


n = int(input())
heights = input()
heights = heights.split()
heights = [int(item) for item in heights]
heights.sort()
[print(item) for item in heights]


n = int(input())
L = list(map(int, input().split()))
mn = 0
L.sort()
for it in L:
	print(it, end=' ')


def Gravity(n, a):
	a.sort()
	s = ''
	for i in range(n):
		s = s + str(a[i]) + ' '
	return s
x = int(input())
x1 = [int(n) for n in input().split()]
print(Gravity(x, x1))


n = int(input())
a = list(map(int, input().split()))
for j in range(1, n):
	fake_max = 0
	for i in range(n - j + 1):
		if a[i] > fake_max:
			fake_max = a[i]
			pos = i
	temp = a[n - j]
	a[n - j] = fake_max
	a[pos] = temp
print(*a)


n = int(input())
t = [int(x) for x in input().split()]
t = sorted(t)
print(*t)


num = int(input())
lst = list(map(int, input().rstrip().split()))
s = sorted(lst)
for i in range(len(lst)):
	print(s[i], end=' ')


squares_cnt = int(input())
squares_height = sorted(map(int, input().split()))
print(' '.join(map(str, squares_height)))


n = int(input())
l_d = list(map(int, input().split()))[::-1]
slc = 1
for i in range(n - 1):
	max_num = max(l_d[slc:])
	if max_num > l_d[i]:
		(l_d[slc + l_d[slc:].index(max_num)], l_d[i]) = (l_d[i], max_num - l_d[i] + l_d[i])
	slc += 1
print(' '.join(map(str, l_d[::-1])))


n = int(input())
arr = input().split()
for i in range(0, n, 1):
	arr[i] = int(arr[i])
arr.sort()
for i in range(0, n, 1):
	print(int(arr[i]), end=' ')


a = 0
a = int(input())
b = list(map(int, input().split()))
b.sort()
for i in b:
	print(i, end=' ')


n = int(input())
cubes = list(map(int, input().split()))
last = [0] * n
while last != cubes:
	last = cubes.copy()
	for idx in range(n - 1, 0, -1):
		if cubes[idx] < cubes[idx - 1]:
			(cubes[idx], cubes[idx - 1]) = (cubes[idx - 1], cubes[idx])
for itm in cubes:
	print(itm, end=' ')


columns = int(input())
numberOfCubes = input()
numberOfCubes = numberOfCubes.split(' ')
for i in range(len(numberOfCubes)):
	numberOfCubes[i] = int(numberOfCubes[i])
numberOfCubes.sort()
outputString = ''
for i in range(len(numberOfCubes)):
	outputString += str(numberOfCubes[i]) + ' '
outputString = outputString[:-1]
print(outputString)


input()
block = str(input())
l = block.split(' ')
l = [int(x) for x in l]
l.sort()
l = [str(x) for x in l]
cube = ' '.join(l)
cube = cube.strip(' ')
print(cube)


n = int(input())
s = input().split()
count = 0
my_list = []
new_list = []
lst = []
for i in s:
	c = int(i)
	my_list.append(c)
while count != n:
	new_list.append(min(my_list))
	my_list.remove(min(my_list))
	count += 1
for k in new_list:
	lst.append(str(k))
str1 = ' '.join(lst)
print(str1)


n = int(input())
line = [int(y) for y in input().split()]
line = sorted(line)
for i in range(len(line)):
	print(line[i], end=' ')


n = int(input())
linea = input()
problemas = [int(number) for number in linea.split(' ')]
problemas.sort()
print(' '.join([str(number) for number in problemas]))


n = int(input(''))
m = input().split()
m = [int(n) for n in m]
m.sort()
print(*m)


x = int(input())
entrada = list(map(int, input().split()))
entrada.sort()
print(' '.join(list(map(str, entrada))))


n = int(input())
linha = input().split(' ')
caixa = []
for x in range(n):
	caixa.append(int(linha[x]))
resposta = sorted(caixa, key=int)
for y in range(len(resposta)):
	if y != len(resposta) - 1:
		print(resposta[y], end=' ')
	else:
		print(resposta[y])


cols = int(input(''))
boxes_num = input('')
boxes_num = [int(a) for a in boxes_num.split(' ')]
max_num = max(boxes_num)
lenght = len(boxes_num)
for i in range(cols):
	for j in range(cols):
		if boxes_num[i] > boxes_num[lenght - j - 1] and i < lenght - j - 1:
			rest = boxes_num[i] - boxes_num[lenght - j - 1]
			boxes_num[i] -= rest
			boxes_num[lenght - j - 1] += rest
resp = ''
for i in range(cols):
	resp = resp + str(boxes_num[i]) + ' '
print(resp)


n = int(input())
a = list(map(int, input().split()))
for i in range(len(a) - 1, -1, -1):
	for j in range(i - 1, -1, -1):
		if a[j] > a[i]:
			diff = a[j] - a[i]
			a[i] = a[i] + diff
			a[j] = a[j] - diff
for i in range(len(a)):
	if i == len(a) - 1:
		print(a[i], end='')
	else:
		print(a[i], end=' ')


input()
m = sorted(map(int, input().split()))
print(' '.join(map(str, m)))


n = int(input())
x = input()
l = []
l.extend(x.split())
for i in range(len(l)):
	l[i] = int(l[i])
l = sorted(l)
for i in l:
	print(i, ' ', end='')


n = eval(input())
li = list(map(eval, input().split()))
li.sort()
for i in li:
	print(i, end=' ')


columnas = int(input())
distribucion = input().split(' ')
distribucion = [int(elem) for elem in distribucion]
distribucion.sort()
distribucion = [str(elem) for elem in distribucion]
print(' '.join(distribucion))


n = int(input())
m = list(map(int, input().split()))
f = 100
d = [0] * f
for (i, v) in enumerate(m):
	for j in range(v):
		d[j] += 1
r = [0] * n
for i in range(n):
	cnt = 0
	for v in d:
		if v >= n - i:
			cnt += 1
	r[i] = cnt
print(' '.join(map(str, r)))


def Main():
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	for i in range(n):
		print(arr[i], end=' ', flush=True)
Main()


n = int(input())
list1 = list(map(int, input().split()))
list1 = sorted(list1)
list1 = list(map(str, list1))
print(' '.join(list1))


n = int(input())
l1 = [int(x) for x in input().split()]
i = len(l1) - 1
while i >= 0:
	targ = l1[i]
	j = len(l1) - 1
	while j > i:
		test = l1[j]
		if targ > test:
			temp = l1[j]
			l1[j] = l1[i]
			l1[i] = temp
		j -= 1
	i -= 1
c_out = ''
for x in l1:
	c_out += str(x) + ' '
print(c_out)


qtd = int(input())
l = list(map(int, input().split()))
l.sort()
for i in range(0, qtd):
	print('{} '.format(l[i]), end='')


from sys import stdin, stdout
n = stdin.readline()
stdout.write(' '.join((str(e) for e in sorted(map(int, stdin.readline().rstrip().split(' '))))))


n = int(input())
cubes = [int(i) for i in input().split()]
cubes.sort()
print(*cubes, sep=' ')


t = int(input())
ar = [int(x) for x in input().split()]
for i in range(t):
	for j in range(i + 1, t):
		if ar[i] > ar[j]:
			f = ar[i] - ar[j]
			ar[i] -= f
			ar[j] += f
			ma = j
for i in ar:
	print(i, end=' ')


number = int(input())
number1 = list(map(int, input().split(' ')))
number1.sort()
for i in range(len(number1)):
	print(number1[i], end=' ')


n = int(input())
k = 0
list = [int(i) for i in input().split()]
while k < n:
	m = min(list)
	print(m, end=' ')
	s = list.index(m)
	list.pop(s)
	k = k + 1


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(1000000)
	threading.stack_size(1024000)
	thread = threading.Thread(target=main)
	thread.start()
import sys
input = sys.stdin.readline
scanner = lambda : int(input())
string = lambda : input().rstrip()
get_list = lambda : list(read())
read = lambda : map(int, input().split())
get_float = lambda : map(float, input().split())

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // math.gcd(a, b)

def is_integer(n):
	return math.ceil(n) == math.floor(n)

def nCr(n, k):
	if k > n:
		return 0
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	(prime[0], prime[1]) = (False, False)
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def phi(n):
	result = n
	p = 2
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			result = result * (1.0 - 1.0 / float(p))
		p = p + 1
	if n > 1:
		result = result * (1.0 - 1.0 / float(n))
	return int(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False
	return True

def next_prime(n, primes):
	while primes[n] != True:
		n += 1
	return n
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

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

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		if check(mid, w, h, n):
			low = mid + 1
		else:
			high = mid
	return low

def check(moves, n):
	val = (moves + 1) // 2
	rem = moves - val
	sol = (val + 1) * (rem + 1)
	return sol < n

def sortSecond(val):
	return val[1]
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
alphs = 'abcdefghijklmnopqrstuvwxyz'
from itertools import permutations
import math
import bisect as bis
import random
import sys
import collections as collect
import functools as fnt
from decimal import Decimal

def solve():
	n = scanner()
	a = get_list()
	a.sort()
	print(*a)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
t = 1
for i in range(t):
	solve()


a = int(input())
li = [int(x) for x in input().split()]
li = sorted(li)
for i in range(a):
	li[i] = str(li[i])
print(' '.join(li))


n = int(input())
a = [int(i) for i in input().split()]
b = a
b.sort()
t = 0
while b != a:
	while t < len(a) - 1:
		if a[len(a) - 1 - i] < a[len(a) - 2 - i]:
			a[len(a) - 1 - i] += a[len(a) - 2 - i] - a[len(a) - 1 - i]
			a[len(a) - 2 - i] -= a[len(a) - 2 - i] - a[len(a) - 1 - i]
		t += 1
	b = a
	b.sort()
b = [str(i) for i in a]
print(' '.join(b))


x = input()
lista = input().split(' ')
lista = list(map(int, lista))
lista.sort()
lista = list(map(str, lista))
print(' '.join(lista))


n = int(input())
e = []
s = ''
a = input().split()
a.sort(key=int)
for i in a:
	s += str(i + ' ')
print(str(s))


n = int(input())
l = [*map(int, input().split())]
l.sort()
for i in l:
	print(i, end=' ')


l = input()
l = int(l)
caixas = list(map(int, input().split()))
caixas.sort()
for caixa in caixas:
	print(caixa, end=' ')


def mergeSort(cols):
	if len(cols) >= 2:
		middle = len(cols) // 2
		left = cols[:middle]
		right = cols[middle:]
		mergeSort(left)
		mergeSort(right)
		(left_index, right_index, col_index) = (0, 0, 0)
		while left_index < len(left) and right_index < len(right):
			if left[left_index] < right[right_index]:
				cols[col_index] = left[left_index]
				left_index += 1
			else:
				cols[col_index] = right[right_index]
				right_index += 1
			col_index += 1
		while left_index < len(left):
			cols[col_index] = left[left_index]
			left_index += 1
			col_index += 1
		while right_index < len(right):
			cols[col_index] = right[right_index]
			right_index += 1
			col_index += 1
	return cols

def main():
	input()
	cols = [int(x) for x in input().replace('\n', '').split(' ')]
	ordered = mergeSort(cols)
	for i in range(len(ordered)):
		if i != len(ordered) - 1:
			print('{} '.format(ordered[i]), end='')
		else:
			print('{}\n'.format(ordered[i]), end='')
main()


n = int(input())
ins = list(map(int, input().split()))
while n > 0:
	for i in range(n - 1):
		if ins[i] > ins[i + 1]:
			temp = ins[i] - ins[i + 1]
			ins[i + 1] += temp
			ins[i] -= temp
	n -= 1
for x in ins:
	print(x, end=' ')


n = int(input())
m = input().split()
for i in range(len(m)):
	m[i] = int(m[i])
m.sort()
print(*m)


num = int(input())
str = input()
str = str.split(' ')
count = 0
while count < len(str):
	str[count] = int(str[count])
	count += 1
y = 0
while y < len(str) - 1:
	min = y
	x = y + 1
	while x < len(str):
		if str[x] < str[min]:
			(min, x) = (x, min)
		x += 1
	temp = str[y]
	str[y] = str[min]
	str[min] = temp
	y += 1
for i in str:
	print(f'{i} ', end='')


n = int(input())
cubes = [int(num) for num in input().split()]
for x in range(0, n - 1):
	minimum = x
	for y in range(x + 1, n):
		if cubes[y] < cubes[minimum]:
			minimum = y
	prev_val = cubes[x]
	cubes[x] = cubes[minimum]
	cubes[minimum] = prev_val
result = str(cubes[0])
for column in range(1, n):
	result = result + ' ' + str(cubes[column])
print(result)


while True:
	try:
		n = int(input())
		blocks = list(map(int, input().split()))
		height = max(blocks)
		width = n
		grid = [['y'] * (height - b) + b * ['x'] for b in blocks]
		new_grid = height * [[]]
		for i in range(height):
			s = []
			for j in range(width):
				s.append(grid[j][i])
			new_grid[i] = s
		for row in range(height):
			new_grid[row].sort(reverse=True)
		ans = []
		for col in range(width):
			count = 0
			for row in range(height):
				cell = new_grid[row][col]
				if cell == 'x':
					count += 1
			ans.append(count)
			ans = list(map(str, ans))
		print(' '.join(ans))
	except EOFError:
		break


n = int(input())
cubes = map(int, input().split())
new_cubes = [0] * 100
for c in cubes:
	for i in range(c):
		new_cubes[i] += 1
r = ''
for i in range(n, 0, -1):
	r += str(len([c for c in new_cubes if c >= i])) + ' '
print(r)


cnt = 1
p = 0
r = []

def init(a):
	for p in range(len(a)):
		a[p] = int(a[p])
	return a
n = int(input())
d = input().split()
d = init(d)
d = sorted(d)
for i in range(n):
	print(d[i], end=' ')


import sys
the_list = sys.stdin.readlines()
the_list[1].rstrip()
slist = [int(x) for x in the_list[1].split()]
slist.sort()
for x in slist:
	print(str(x) + ' ')


t = int(input())
lst = sorted(list(map(int, input().split())))
print(' '.join((str(i) for i in lst)))


def gravity_flip():
	num_columns = int(input())
	coins_array = input()
	coins_array = coins_array.split()
	for j in range(len(coins_array)):
		coins_array[j] = int(coins_array[j])
	coins_array = insertionsort(coins_array)
	for item in coins_array:
		print(item, end=' ')

def insertionsort(aList):
	n = len(aList)
	for k in range(1, n):
		tmp = aList[k]
		j = k - 1
		while j >= 0 and tmp < aList[j]:
			aList[j + 1] = aList[j]
			j -= 1
			aList[j + 1] = tmp
	return aList
gravity_flip()


import bisect
import collections
import copy
import functools
import heapq
import itertools
import math
import random
import re
import sys
import time
import string
from time import time_ns
from typing import List
sys.setrecursionlimit(99999)

def II():
	return int(sys.stdin.readline().strip())

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

def SI():
	return sys.stdin.readline().strip()
input()
print(*sorted(IIs()))


n = int(input())
i = map(int, input().split())
l = []
s = ''
for x in i:
	l.append(x)
l.sort()
for j in range(len(l)):
	s = s + str(l[j]) + ' '
s = s.rstrip()
print(s)


import sys

def changeGravity(columnCounts):
	changedGravityColumns = []
	changedGravityColLength = 1
	changedGravityColumns.append(columnCounts.pop())
	while columnCounts:
		changedGravityIndex = changedGravityColLength - 1
		nextCount = columnCounts.pop()
		while nextCount != 0 and changedGravityIndex >= 0:
			if nextCount > changedGravityColumns[changedGravityIndex]:
				heightDifference = nextCount - changedGravityColumns[changedGravityIndex]
				changedGravityColumns[changedGravityIndex] += heightDifference
				nextCount -= heightDifference
			changedGravityIndex -= 1
		changedGravityColumns.insert(0, nextCount)
		changedGravityColLength += 1
	return changedGravityColumns
numElements = int(sys.stdin.readline())
columnCounts = []
inputString = sys.stdin.readline().split()
for val in inputString:
	columnCounts.append(eval(val))
outputArray = changeGravity(columnCounts)
for val in outputArray:
	print(val, end=' ')


def insertion_sort(list1, n):
	for i in range(1, n):
		key = list1[i]
		j = i - 1
		while j >= 0 and int(list1[j]) > int(key):
			list1[j + 1] = list1[j]
			j -= 1
		list1[j + 1] = key
n = int(input())
list1 = input().split()
insertion_sort(list1, n)
for i in range(n):
	print(int(list1[i]), end=' ')


n = int(input())
l = list(map(int, input().split()))
m = 0
t = 0
for i in range(len(l) - 1, 0, -1):
	val = l[i]
	for j in range(i - 1, -1, -1):
		if l[j] > val:
			t = l[j]
			l[j] = val
			val = t
	l[i] = val
for i in range(len(l)):
	print(l[i], end=' ')


n = input()
elements = input()
for x in n:
	y = elements.split(' ')
	y.sort(key=int)
s = ' '.join(y)
print(s)


n = int(input())
nums = list(map(int, input().split(' ')))
nums.sort()
print(*nums)


input()
s = sorted(map(int, input().split()))
for x in s:
	print(x, ' ', end='', flush=True)
print()


n = int(input())
l = [int(x) for x in input().split()]
l.sort()
l1 = []
for i in l:
	l1.append(str(i))
	l1.append(' ')
l2 = ''.join(l1)
print(l2)


size = int(input())
arrStr = input().split()
arr = []
for i in range(len(arrStr)):
	arr.append(int(arrStr[i]))
arr.sort()
for i in range(len(arr)):
	print(str(arr[i]), end='')
	if i < len(arr) - 1:
		print(' ', end='')
print('')


inp1 = input()
inp1 = int(inp1)
inp2 = input().strip().split()
lista = list(inp2)
for x in range(0, inp1):
	lista[x] = int(lista[x])
lista.sort()
resultado = ''
for x in range(0, inp1):
	lista[x] = str(lista[x])
	resultado += lista[x] + ' '
print(resultado)


n = int(input())
a = [int(i) for i in input().split()]
count = [0] * max(a)
for i in a:
	for j in range(i):
		count[j] += 1
out = [0] * n
for i in range(max(a)):
	for j in range(count[i]):
		out[n - 1 - j] += 1
for i in out:
	print(i, end=' ')


qtd = int(input())
colunas = input().split()
colunas = [int(numero) for numero in colunas]
colunas.sort()
resultado = ' '.join((str(coluna) for coluna in colunas))
print(resultado)


n = int(input())
line = list(map(int, input().split()))
for m in range(len(line))[::-1]:
	for i in range(m):
		if line[i] > line[i + 1]:
			(line[i], line[i + 1]) = (line[i + 1], line[i])
line = [str(i) for i in line]
print(' '.join(line))


n = int(input())
arr = list(map(int, input().split()))
r = {}
for i in range(1, max(arr) + 1):
	if i in arr:
		r[i] = arr.count(i)
s = []
for i in r:
	for j in range(r[i]):
		s.append(i)
s.sort()
for i in s:
	print(i, end=' ')


a = int(input())
inp = list(map(int, input().split()))
inp.sort()
for item in inp:
	print(item, end=' ')


input_list = []
num = 0
while True:
	if num == 2:
		break
	line = input()
	line = line.split()
	line = list(map(int, line))
	input_list.append(line)
	num += 1
input_list.pop(0)
ns = input_list[0]
ns.sort()
ns = [str(i) for i in ns]
print(' '.join(ns))


n = int(input())
cols = list(map(int, input().split()))
res = 0
old_cols = list()
j = 0
while old_cols != cols:
	old_cols = cols.copy()
	for i in range(len(cols) - 1):
		res = cols[i] - cols[i + 1]
		if res > 0:
			cols[i + 1] += res
			cols[i] -= res
	j += 1
print(' '.join(map(str, cols)))


n = [int(i) for i in input().split()][0]
a = [int(i) for i in input().split()]
print(*sorted(a))


a = int(input())
print(*sorted(list(map(int, input().split()))), end=' ')


n = int(input())
n1 = list(map(int, input().split()))
print(*sorted(n1))


n = int(input())
a = list(map(lambda x: int(x), input().split()))
for i in range(n - 1, -1, -1):
	for j in range(i, -1, -1):
		if a[i] < a[j]:
			t = a[j] - a[i]
			a[i] += t
			a[j] -= t
print(' '.join([str(i) for i in a]))


x = input()
x = input()
x = list(map(int, x.strip().split()))
x.sort()
print(*x)


n = int(input())
a = list(map(int, input().split()))
b = [0] * n
for u in a:
	for i in range(n - 1):
		if a[i] > a[i + 1]:
			s = a[i] - a[i + 1]
			a[i] -= s
			a[i + 1] += s
print(*a)


n = int(input())
blocks = [int(x) for x in input().split()]
print(*sorted(blocks))


input()
k = [int(a) for a in input().split()]
k.sort()
for i in k:
	print(i, end=' ')


n = input()
ni = input()
a = []
a = ni.split(' ')
y = int(n) - 1
while y > 0:
	y = y - 1
	x = int(n)
	while x > 1:
		x = x - 1
		if int(a[x - 1]) > int(a[x]):
			(a[x - 1], a[x]) = (a[x], a[x - 1])
print(*a)


a = int(input())
l = list(map(int, input().split()))
l.sort()
l = list(map(str, l))
print(' '.join(l))


n = int(input())
input_list = input().split()
a = []
m = 0
for i in range(n):
	a.append(int(input_list[i]))
a = sorted(a, reverse=False)
for i in range(n - 1):
	print(a[i], end=' ')
print(a[n - 1])


n = input()
nums = input().split()
nums.sort(key=lambda x: int(x))
print(' '.join(nums))


c = int(input())
la = [int(s) for s in input().split(' ')]
la.sort()
print(' '.join([str(s) for s in la]))


n = int(input())
l = input().split()
num = []
for i in range(n):
	num += [int(l[i])]
num.sort()
for i in range(n):
	num[i] = str(num[i])
print(' '.join(num))


n = int(input())
lista = [int(i) for i in input().split()]
lista.sort()
for i in range(len(lista) - 1):
	print('{} '.format(lista[i]), end='')
print(lista[-1])


x = int(input())
z = input().split()
for i in range(len(z)):
	z[i] = int(z[i])
z = sorted(z)
for i in z:
	print(i, ' ', end='')


from typing import List
ROW_TYPE = List[int]

def solve(*, row: ROW_TYPE) -> str:
	return ' '.join(map(str, list(sorted(row))))
input()
row_list = list(map(int, input().split(' ')))
result = solve(row=row_list)
print(result)


n = int(input())
a = list(map(int, input().split()))
for i in range(n - 1):
	if a[i] > a[i + 1]:
		a.sort()
print(*a, sep=' ')


x = input()
lt = list(map(int, input().split()))
lt = list(map(str, sorted(lt)))
print(' '.join(lt))


n = int(input())
a = list(map(int, input().split()))
b = sorted(a)
for bi in b:
	print(bi, end=' ')


n = int(input())
l = input().split()
for i in range(n):
	l[i - 1] = int(l[i - 1])
l.sort()
out = ''
for i in range(n):
	out = out + str(l[i]) + ' '
print(out)


import sys
number_of_columns = int(sys.stdin.readline())
numbers = sys.stdin.readline().split()
for i in range(len(numbers)):
	numbers[i] = int(numbers[i])
numbers.sort()
for i in numbers:
	print(i, end=' ')


n = int(input())
intxt = input()
nums = [int(x) for x in intxt.split()]
for i in range(1, n):
	for j in range(i, 0, -1):
		if nums[j] < nums[j - 1]:
			(nums[j], nums[j - 1]) = (nums[j - 1], nums[j])
		else:
			break
for num in nums:
	print(num, end=' ')


z = int(input())
x = list(map(int, input().split()))
for i in range(z):
	for o in range(x[i]):
		for q in range(0, z - 1):
			if x[q] > x[q + 1]:
				a = x[q] - x[q + 1]
				x[q] -= a
				x[q + 1] += a
s = ''
for i in x:
	s += str(i) + ' '
print(s)


n = int(input().strip())
cubes = list(map(int, input().strip().split()))
values = [0] * 101
for c in cubes:
	values[c] += 1
for (idx, val) in enumerate(values):
	if val != 0:
		print(' '.join([str(idx)] * val), end=' ')


import string
x = int(input())
y = [int(i) for i in input().split()]
y.sort()
z = [str(i) for i in y]
print(' '.join(z))


n = int(input())
num = input().split()
for i in range(n):
	num[i] = int(num[i])
num.sort()
out = str(num[0])
for i in range(1, n):
	out += ' ' + str(num[i])
print(out)


a = int(input())
b = [int(x) for x in input().split()]
for i in range(len(b)):
	for j in range(len(b) - i - 1):
		if b[j] > b[j + 1]:
			(b[j], b[j + 1]) = (b[j + 1], b[j])
for i in b:
	print(i, end=' ')


count = input()
nums = input().split()
nums = list(map(int, nums))
nums.sort()
print(*nums)


import math
n = int(input())
columns = [int(x) for x in input().split()]

def qsort(array, a, b):
	i = a
	j = b
	k = math.floor((a + b) / 2)
	middle = array[k]
	while i <= j:
		while array[i] < middle:
			i += 1
		while array[j] > middle:
			j -= 1
		if i <= j:
			(array[i], array[j]) = (array[j], array[i])
			i += 1
			j -= 1
	if a < j:
		qsort(array, a, j)
	if i < b:
		qsort(array, i, b)
qsort(columns, 0, len(columns) - 1)
print(' '.join([str(x) for x in columns]))


n = int(input())
text = input().split()
li = [int(i) for i in text]
li.sort()
print(' '.join((str(i) for i in li)))


n = int(input())
list = list(map(int, input().split()))
list.sort(reverse=False)
for i in range(n):
	print(list[i], end=' ')


x = int(input())
y = input().split()
y = [int(I) for I in y]
count = 0
while x > count:
	count += 1
	for i in range(0, x - 1, 1):
		if y[i] > y[i + 1]:
			(y[i], y[i + 1]) = (y[i + 1], y[i])
for i in y:
	print(i, end=' ')


n = int(input())
cols = list(map(int, input().split()))
while n > 0:
	n -= 1
	for i in reversed(range(n)):
		if cols[i] > cols[n]:
			(cols[i], cols[n]) = (cols[n], cols[i])
print(*cols)


n = int(input())
print(' '.join([str(k) for k in sorted(list(map(int, input().split())))]))


x = int(input())
mylist = [int(x) for x in input().split()]
if x == len(mylist):
	mylist.sort()
	s = ' '
	for k in mylist:
		s = s + str(k) + ' '
	print(s[1:])


class Board:

	def __init__(self):
		self.col_num = 0
		self.cols = list()

	@classmethod
	def from_input(cls):
		board = cls()
		col_num = int(input().strip())
		cols = input().strip().split(' ')
		cols = [int(x) for x in cols]
		board.col_num = col_num
		board.cols = cols
		return board

def quicksort(array):
	left = list()
	right = list()
	if not array:
		return array
	pivot = array.pop()
	for x in array:
		if x < pivot:
			left.append(x)
		if x >= pivot:
			right.append(x)
	return quicksort(left) + [pivot] + quicksort(right)
board = Board.from_input()
result = quicksort(board.cols)
print(*result)


n = int(input())
heights = list(map(int, input().split()))
heights.sort()
print(*heights)


n = int(input())
a = sorted(map(int, input().split()))
j = []
for e in a:
	j.append(str(e))
print(' '.join(j))


n = input()
roll = input().split(' ')
roll = list(map(int, roll))
roll = sorted(roll)
roll = list(map(str, roll))
print(' '.join(roll))


def solve(xs):
	return ' '.join((str(i) for i in sorted(xs)))

def main():
	n = int(input())
	xs = [int(i) for i in input().strip().split()]
	assert n == len(xs)
	result = solve(xs)
	print(result)
main()


n = int(input())
values = [int(i) for i in input().split()]
values.sort()
for i in range(len(values)):
	values[i] = str(values[i])
print(' '.join(values))


N = int(input())
l = list(map(int, input().split()))
l.sort()
for i in l:
	print(i, end=' ')


input()
s = map(int, input().split())
print(*sorted(s))


_ = input()
x = list(map(int, input().split(' ')))
x.sort()
print(' '.join([str(i) for i in x]))


n = int(input())
ls = map(int, input().split())
ls1 = sorted(ls)
for i in range(len(ls1)):
	print(ls1[i], end=' ')


n = int(input())
a = list(map(int, input().split()))

def ms(a, l, h):
	if l == h:
		return
	m = (l + h) // 2
	ms(a, l, m)
	ms(a, m + 1, h)
	merge(a, l, m, h)
	return

def merge(a, l, m, h):
	p1 = l
	p2 = m + 1
	lst = []
	while p1 <= m and p2 <= h:
		if a[p1] > a[p2]:
			lst.append(a[p2])
			p2 += 1
		else:
			lst.append(a[p1])
			p1 += 1
	while p1 <= m:
		lst.append(a[p1])
		p1 += 1
	while p2 <= h:
		lst.append(a[p2])
		p2 += 1
	a[l:h + 1] = lst[:]
	return a
ms(a, 0, n - 1)
for i in a:
	print(i, end=' ')


import sys
data = sys.stdin.readlines()
archivo = [line.split() for line in data]
lista = [int(i) for i in archivo[1]]
lista.sort()
string = ''
for item in lista:
	string = string + str(item) + ' '
string.strip()
sys.stdout.write(string)


n = input()
l1 = [int(x) for x in input().split()]
l1.sort()
for w in l1:
	print(w, end=' ')


from sys import stdin, stdout
from math import ceil
from collections import deque
inp = stdin.readline
out = stdout.write
n = int(inp().strip())
l = list(map(int, inp().strip().split()))
l.sort()
print(*l)


from sys import stdin

def partition(lista):
	(pivote, menores, mayores) = (lista[0], [], [])
	for x in range(1, len(lista)):
		if lista[x] < pivote:
			menores.append(lista[x])
		else:
			mayores.append(lista[x])
	return (menores, [pivote], mayores)

def quickSort(lista):
	if len(lista) < 2:
		return lista
	(menores, medio, mayores) = partition(lista)
	return quickSort(menores) + medio + quickSort(mayores)

def main():
	x = stdin.readline().strip()
	p = stdin.readline().strip().split()
	lista = []
	for i in p:
		lista.append(int(i))
	p = ''
	ordenada = quickSort(lista)
	for i in ordenada:
		p = p + str(i) + ' '
	print(p)
main()


n = int(input())
cols = [int(c) for c in input().split(' ')]
col = sorted(cols)
col = [str(c) for c in col]
print(' '.join(col))


n = int(input())
col = list(map(int, input().split(' ')))
col.sort()
string = ''
for i in col:
	string += str(i) + ' '
print(string)


arrLength = int(input())
arr = [int(x) for x in input().strip().split()]
arr.sort()
print(' '.join((str(e) for e in arr)))


x = int(input())
a = ''
y = input().split(' ')
y = [int(w) for w in y]
y.sort()
for i in range(len(y)):
	a = a + str(y[i]) + ' '
print(a)


import sys
n = int(sys.stdin.readline())
highs = sys.stdin.readline().strip().split()
highs = [int(x) for x in highs]
highs.sort()
print(' '.join(map(str, highs)))


h = int(input())
x = input()
r = x.split()
r = [int(j) for j in r]
r.sort()
for i in r:
	print(i, end=' ')


num_col = int(input())
height_col = list(map(int, input().split()))
height_col.sort()
print(*height_col)


a = []
n = int(input())
b = input()
a = [int(op) for op in b.split()]
for i in range(n - 1, -1, -1):
	for j in range(i - 1, -1, -1):
		if a[j] > a[i]:
			kk = a[j] - a[i]
			a[i] += kk
			a[j] -= kk
for i in a:
	print(i, end=' ')
print('\n')


__author__ = 'Utena'
n = int(input())
s = list(map(int, input().split()))
s1 = [0] * (max(s) + 1)
for i in range(1, max(s) + 1):
	for j in range(n):
		if s[j] >= i:
			s1[i] += 1
s = [0] * n
for i in range(n):
	for j in range(len(s1)):
		if s1[j] > i:
			s[n - i - 1] += 1
print(' '.join(map(str, s)))


def merge(s1, s2, s):
	i = j = 0
	while i + j < len(s):
		if j == len(s2) or (i < len(s1) and s1[i] < s2[j]):
			s[i + j] = s1[i]
			i += 1
		else:
			s[i + j] = s2[j]
			j += 1
	return s

def merge_sort(s):
	n = len(s)
	if n < 2:
		return s
	mid = n // 2
	s1 = s[0:mid]
	s2 = s[mid:n]
	merge_sort(s1)
	merge_sort(s2)
	return merge(s1, s2, s)
a = int(input())
s = [int(x) for x in input().split()]
t = merge_sort(s)
print(*t)


a = int(input())
b = list(map(int, input().split()))
b.sort()
b = str(b)
b = b.replace(',', '')
print(b[1:-1])


int(input())
q = [int(x) for x in input().split()]
q.sort()
for x in q:
	print(x, end=' ')
print()


nboxes = input()
boxes = list(map(int, input().split()))
boxes.sort()
print(' '.join(map(str, boxes)))


n = int(input())
heights = list(map(int, input().split(' ')))
max_h = -1
for h in heights:
	max_h = max(max_h, h)
levels = [0] * max_h
for h in heights:
	for i in range(h):
		levels[i] += 1
heights = [0] * n
for l in levels:
	for i in range(n - l, n):
		heights[i] += 1
separator = ''
output = ''
for h in heights:
	output = output + separator + str(h)
	separator = ' '
print(output)


n = int(input())
m = list(map(int, input().split()))[:n]
m.sort()
for i in range(0, len(m)):
	print(m[i], end=' ')


columns = input()
original_location = input()
new_location = list(map(int, original_location.split(' ')))
new_location = sorted(new_location)
print(' '.join(list(map(str, new_location))))


n = int(input())
l = list(map(int, input().split()))
l.sort()
for i in l:
	print(i)


x = int(input())
w = input()
l = list()
l.extend(w.split())
for i in range(x):
	l[i] = int(l[i])
for i in sorted(l):
	print(i, ' ', end='')


x = int(input())
y = input().split()
lst = []
for i in range(x):
	z = int(y[i])
	lst.append(z)
lst.sort()
print(*lst)


n = int(input())
ai = list(map(int, input().split()))
print(*list(sorted(ai, reverse=False)))


def quicksort(arr):
	if len(arr) <= 1:
		return arr
	pivot = arr[len(arr) // 2]
	left = [x for x in arr if x < pivot]
	middle = [x for x in arr if x == pivot]
	right = [x for x in arr if x > pivot]
	return quicksort(left) + middle + quicksort(right)
colmnsNum = int(input())
numbers = list(map(int, input().split()))
sortedNumbers = list(map(str, quicksort(numbers)))
filppedCube = ''
for x in sortedNumbers:
	filppedCube += x + ' '
print(filppedCube)


import math
from decimal import Decimal

def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return (n, b)

def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return (n, b, c)

def dv():
	(n, m) = map(int, input().split())
	return (n, m)

def dva():
	(n, m) = map(int, input().split())
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	return (n, m, b)

def eratosthenes(n):
	sieve = list(range(n + 1))
	for i in sieve:
		if i > 1:
			for j in range(i + i, len(sieve), i):
				sieve[j] = 0
	return sorted(set(sieve))

def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return (n, b, m, c)

def dvs():
	n = int(input())
	m = int(input())
	return (n, m)

def ist(x):
	d = 1
	while d < x:
		d *= 2
	return d == x
(n, a) = na()
print(*sorted(a))


n = int(input())
p = []
s = ''
p = [int(i) for i in input().split()]
p.sort()
for i in range(len(p) - 1):
	s = s + str(p[i]) + ' '
s = s + str(p[len(p) - 1])
print(s)


import sys
linea1 = sys.stdin.readline()
linea2 = sys.stdin.readline()
arr = linea2.split()
arr = list(map(int, arr))
arr = sorted(arr)
x = ''
for i in arr:
	x += '{} '.format(i)
print(x)


n = int(input())
l = list(map(int, input().split()))
l1 = sorted(l)
s = ''
for i in range(len(l1)):
	if i == len(l1) - 1:
		s += str(l1[i])
	else:
		s += str(l1[i])
		s += ' '
print(s)


n = int(input())
a = [int(x) for x in input().split(' ')]
for i in range(len(a)):
	for i in range(len(a) - 1):
		if a[i] > a[i + 1]:
			d = a[i] - a[i + 1]
			a[i + 1] += d
			a[i] -= d
for x in a:
	print(x, end=' ')


n = int(input())
s = input()
s = s.split(' ')
p = []
for i in s:
	p.append(int(i))
p.sort()
k = ''
for i in p:
	k = k + str(i) + ' '
print(k)


def quick(arr):
	while 1:
		counter = 0
		for i in range(len(arr) - 1):
			s = arr[i]
			p = arr[i + 1]
			if arr[i] > arr[i + 1]:
				arr[i] = p
				arr[i + 1] = s
				counter = counter + 1
		if counter == 0:
			return arr
		else:
			continue
n = int(input())
list = input().split()
arr = [0] * n
i = 0
while i < len(list):
	arr[i] = int(list[i])
	i = i + 1
arr = quick(arr)
for item in arr:
	print(item, end=' ')


n = int(input())
ai = list(map(int, input().split()))
print(*sorted(ai))


n = int(input())
line = list(map(int, input().split()))
line.sort()
print(*line)


n = int(input())
l = [int(x) for x in input().split()]
l = sorted(l)
a = ''
for i in range(n - 1):
	a = a + str(l[i]) + ' '
a = a + str(l[n - 1])
print(a)


n = int(input())
lst = list(map(int, input().split()))
count = 1
l = [0] * (max(lst) + 1)
for i in lst:
	l[i] += 1
for j in range(max(lst) + 1):
	if l[j] > 0:
		while count <= l[j]:
			print(j, end=' ')
			count += 1
	count = 1


input()
for x in sorted(list((int(a) for a in input().split()))):
	print(x, end=' ')
print()


n = int(input())
a = [int(s) for s in input().split()]
print(*sorted(a))


N = int(input())
d = input().split()
for j in range(N):
	d[j] = int(d[j])
d.sort()
for i in d:
	print(i, end=' ')


n = int(input())
m = [int(i) for i in input().split()]
m.sort()
for i in range(len(m)):
	m[i] = str(m[i])
s = ' '.join(m)
print(s)


n = input()
numbers = list(map(int, input().split()))
numbers.sort()
print(*numbers)


n = int(input())
a = list(map(int, input().split()))
a.sort()
a1 = ''
for i in a:
	a1 += str(i) + ' '
print(a1[:len(a1)])


def solve():
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	for x in a:
		print(x, end=' ')
	return
solve()


n = int(input())
a = input()
A = a.split()
A = map(int, A)
c = []
for i in A:
	c.append(i)
c.sort()
print(' '.join(map(str, c)))


n = int(input())
cube = input().split()
Cube = [0] * n
for i in range(n):
	Cube[i] = int(cube[i])
Cube.sort()
print(' '.join((str(i) for i in Cube)))


def sort(a):
	n = len(a)
	for i in range(n):
		for j in range(i):
			if int(a[i]) < int(a[j]):
				b = a[i]
				a[i] = a[j]
				a[j] = b
	return a
n = int(input())
a = list(input().split())
a = sort(a)
print(' '.join(a))


n = int(input())
ai = list(map(int, input().split()))
ai.sort()
print(' '.join(list(map(str, ai))))


n = int(input())
m = map(int, input().split())
m = sorted(m)
for _ in m:
	print(_, end=' ')


n = int(input())
lst = list(map(int, input().split()))
lst.sort()
answer = ''
for num in lst:
	answer += str(num) + ' '
print(answer)


n = int(input())
a = input(' ')
gflip = a.split(' ')
gflip = [int(a) for a in gflip]
gflip.sort()
b = 0
c = ''
while b < n:
	c += ' ' + str(gflip[b])
	b += 1
	pass
print(c.strip())


def findMax(positions):
	maxHeight = 0
	for item in positions:
		if item > maxHeight:
			maxHeight = item
	return maxHeight

def makeColumnTable(columnString):
	output = []
	columnStringClean = columnString.split('\n')[0]
	columnNumbers = columnStringClean.split(' ')
	for item in columnNumbers:
		output.append(int(item))
	return output

def createTable(columns, maxHeight):
	table = []
	for k in range(len(columns)):
		newColumn = []
		for j in range(maxHeight):
			if j < columns[k]:
				newColumn.append(1)
			else:
				newColumn.append(0)
		table.append(newColumn)
	return table

def sortHorizontally(the_table, the_row):
	for k in range(len(the_table) - 1):
		minimum = k
		for j in range(k, len(the_table)):
			if the_table[j][the_row] < the_table[minimum][the_row]:
				minimum = j
		swap(the_table, minimum, k, the_row)

def swap(the_array, a, b, the_row):
	temp = the_array[a][the_row]
	the_array[a][the_row] = the_array[b][the_row]
	the_array[b][the_row] = temp

def createOutputColumns(the_table):
	the_columns = []
	for k in range(len(the_table)):
		current_sum = 0
		for j in range(len(the_table[k])):
			current_sum += the_table[k][j]
		the_columns.append(current_sum)
	return the_columns
n = int(input())
columnString = input()
columnsIn = makeColumnTable(columnString)
max_height = findMax(columnsIn)
table = createTable(columnsIn, max_height)
for k in range(max_height):
	sortHorizontally(table, k)
columnsOut = createOutputColumns(table)
printString = ''
for item in columnsOut:
	printString += str(item) + ' '
print(printString[:-1])


cols = int(input())
init = input().split()
final = []
for i in init:
	i = int(i)
	final.append(i)
for x in range(0, cols - 1):
	for i in range(0, cols - 1):
		temp = 0
		if final[i] > final[i + 1]:
			temp = final[i] - final[i + 1]
			final[i + 1] += temp
			final[i] -= temp
print(*final)


import sys
n = int(input())
a = [int(x) for x in input().split()]
m = max(a)
gra = [[0 for j in range(n)] for i in range(m)]
for j in range(n):
	for i in range(a[j]):
		gra[i][j] = 1
ans = [0] * n
for i in range(m):
	sum = 0
	for j in range(n - 1, -1, -1):
		sum += gra[i][j]
	for j in range(n - 1, -1, -1):
		if sum > 0:
			ans[j] += 1
		sum -= 1
for res in ans:
	print(res, end=' ')


n = int(input())
s = list(map(int, input().split()))
for i in range(len(s) - 1, 0, -1):
	for j in range(i):
		if s[j] > s[j + 1]:
			(s[j], s[j + 1]) = (s[j + 1], s[j])
print(*s)


n = int(input())
a = [int(i) for i in input().split()]
fq = 101 * [0]
most = 0
for i in range(n):
	fq[a[i]] += 1
	if a[i] > most:
		most = a[i]
out = []
for i in range(1, most + 1):
	while fq[i] > 0:
		out.append(str(i))
		fq[i] -= 1
print(' '.join(out))


n = int(input())
l = sorted(map(int, input().split()))
for e in l:
	print(e, end=' ')


n = int(input())
arr = [int(x) for x in input().split()]
arr1 = arr.sort()
t = 0
if arr == arr1:
	print(*arr)
else:
	if arr[0] > arr[-1]:
		t = abs(arr[0] - arr[-1])
	print(*arr)


n = int(input())
a = [int(i) for i in input().split(' ')]
i = 0
while i != len(a):
	j = i + 1
	while j != len(a):
		if a[i] > a[j]:
			(a[i], a[j]) = (a[j], a[i])
		j += 1
	i += 1
for i in a:
	print(i, end=' ')


from sys import stdin

def gravity():
	l = int(stdin.readline().strip())
	m = [int(x) for x in stdin.readline().strip().split()]
	long = 0
	while long != len(m):
		menor = m[long]
		for j in range(long, len(m)):
			if menor >= m[j]:
				menor = m[j]
				postm = j
		vacio = m[long]
		m[long] = menor
		m[postm] = vacio
		long += 1
	cad = ' '.join((str(e) for e in m))
	print(cad)
gravity()


n = int(input())
li = [int(x) for x in input().split()]
li = sorted(li)
for i in li:
	print(i, end=' ')


import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
N = int(input())
A = [int(x) for x in input().split()]
A.sort()
print(' '.join(map(str, A)))


n = int(input())
a = [int(u) for u in input().split()]
f = sorted(a)
k = 0
l = 0
while True:
	if a == f:
		break
	else:
		for i in range(0, n - 1):
			if a[i] > a[i + 1]:
				k = a[i]
				l = a[i + 1]
				a[i] = l
				a[i + 1] = k
for i in range(len(a)):
	print(a[i], end=' ')


input()
stringList = input().split()
numList = [int(i) for i in stringList]
sortedNumList = sorted(numList)
for num in sortedNumList:
	print(num, end=' ')


n = int(input())
li = [int(i) for i in input().split()]
li.sort()
l = len(li)
for i in li:
	print(i, end=' ')


n = int(input())
cubes = [int(x) for x in input().split()]
print(*sorted(cubes))


n = int(input())
bloks = [int(x) for x in input().split()]
bloks.sort()
print(*bloks)


import sys

def main(columns, i):
	if i == len(columns):
		return
	if i == len(columns) - 1:
		return
	main(columns, i + 1)
	while i < len(columns) - 1 and columns[i] > columns[i + 1]:
		diff = columns[i] - columns[i + 1]
		columns[i] = columns[i + 1]
		columns[i + 1] += diff
		i += 1
for (e, line) in enumerate(sys.stdin.readlines()):
	if e == 0:
		continue
	else:
		columns = list(map(int, line.split()))
columns.sort()
print(' '.join(map(str, columns)))


n = int(input())
ls = list(map(int, input().split()))
print(*sorted(ls))


_ = int(input())
N = list(map(int, input().split()))
print(' '.join(map(str, sorted(N))))


def selSort(myList):
	j = len(myList)
	while j > 1:
		bigNum = 0
		bigNumDex = 0
		for num in range(j):
			if myList[num] > bigNum:
				bigNum = myList[num]
				bigNumDex = num
		temp = myList[num]
		myList[num] = bigNum
		myList[bigNumDex] = temp
		j -= 1
n = input()
inputList = [int(x) for x in input().split()]
selSort(inputList)
print(' '.join([str(x) for x in inputList]))


n = int(input())
lst = [int(j) for j in input().split()]
lst.sort()
newlst = map(str, lst)
print(' '.join(newlst))


__author__ = 'myduomilia'
n = int(input())
arr = list(map(int, input().split()))
for i in range(n - 1, -1, -1):
	for j in range(i, n - 1):
		if arr[j] > arr[j + 1]:
			(arr[j], arr[j + 1]) = (arr[j + 1], arr[j])
print(' '.join([str(i) for i in arr]))


a = int(input())
b = input()
b_l = b.split()
b_l = [int(i) for i in b_l]
if a == len(b_l):
	x = sorted(b_l)
s = [str(i) for i in x]
res = ' '.join(s)
print(res)


n = int(input())
arr = [int(i) for i in input().split()]
arr.sort()
print(*arr, sep=' ')


n = int(input())
l1 = [int(num) for num in input().split(' ')]
l1.sort()
for i in l1:
	print(i, end=' ')


n = int(input())
list = input().split()
list.sort(key=int)
print(' '.join(list))


from copy import deepcopy
c = int(input())
cols = list(map(int, input().split()))
r = max(cols)
grid = []
for col in cols:
	grid.append([0] * (r - col) + [1] * col)
newGrid = deepcopy(grid)
for i in range(c - 1, -1, -1):
	for j in range(r - 1, -1, -1):
		if newGrid[i][j] == 0:
			for k in range(i, -1, -1):
				if newGrid[k][j] == 1:
					newGrid[k][j] = 0
					newGrid[i][j] = 1
					break
result = ' '.join([str(sum(i)) for i in newGrid])
print(result)


n = int(input())
l1 = [int(i) for i in input().split()]
l1.sort()
for i in range(n):
	print(l1[i], end=' ')


n = int(input())
a = [int(x) for x in input().split()]
a.sort()
for i in range(n):
	a[i] = str(a[i])
dot = ' '
print(dot.join(a))


import sys, os.path
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
sys.setrecursionlimit(10 ** 5)

def i():
	return sys.stdin.readline().strip()

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

def li():
	return list(sys.stdin.readline().strip())

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

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

def solve():
	a = ii()
	b = lii()
	c = 1
	while c != a:
		c = 1
		for i in range(a - 1):
			if b[i] - b[i + 1] > 0:
				(b[i], b[i + 1]) = (b[i + 1], b[i])
			else:
				c += 1
	print(' '.join([str(x) for x in b]))
solve()


n = int(input())
d = list(map(int, input().split()))
print(*sorted(d))


n = int(input())
a = list(map(int, input().split()))
for k in range(n - 1, -1, -1):
	h = a[k]
	for i in range(k - 1, -1, -1):
		if a[i] > h:
			d = a[i] - h
			a[k] += d
			a[i] -= d
			h = a[k]
for h in a:
	print(h, end=' ')
print()


m = []
x = int(input())
a = []
c = input().split(' ')
for d in range(x):
	a.append(int(c[d]))
a.sort()
print(*a)


n = int(input())
li = list(map(int, input().split()))
li = sorted(li)
li2 = []
for i in li:
	li2.append(str(i))
print(' '.join(li2))


n = int(input())
m = list(map(int, input().split()))
m.sort()
for j in m:
	print(j, end=' ')


a = input()
print(' '.join((str(i) for i in sorted((int(i) for i in input().split())))))


input()
cubes = [int(i) for i in input().split()]
cubes = sorted(cubes)
output = [str(i) for i in cubes]
print(' '.join(output))


n = int(input())
a = [int(x) for x in input().split()]
a.sort()
for x in a:
	print(f'{x} ', end='')
print()


n = int(input())
a = [int(i) for i in input().split()]
a.sort()
print(*a, sep=' ')


n = int(input())
arr = [int(x) for x in input().split()]
arr = sorted(arr)
print(*[str(i) for i in arr])


n = int(input())
lst = list(map(int, input().split()))
lst.sort()
st = ''
for i in lst:
	st += str(i) + ' '
print(st)


columns = int(input())
cubes_ecolumn = list(map(int, input().split()))
cubes_ecolumn.sort()
cubes_ecolumn = list(map(str, cubes_ecolumn))
print(' '.join(cubes_ecolumn))


t = int(input())
p = [int(x) for x in input().split()]
p.sort()
print(*p)


n = int(input())
s = list(map(int, input().split()))
c = [0] * 105
a = [0] * 105
for i in s:
	for j in range(1, i + 1):
		c[j] += 1
for j in range(1, 101):
	for i in range(n, n - c[j], -1):
		a[i] += 1
for i in range(1, n + 1):
	print(a[i], end=' ')


num = int(input())
toy = sorted([int(x) for x in input().split()])
for i in toy[:-1]:
	print(i, sep='', end=' ')
print(toy[-1])


n = int(input())
l = [int(x) for x in input().split()]
l.sort()
for i in range(0, n):
	if i != n - 1:
		print(l[i], end=' ')
	else:
		print(l[i])


num = int(input())
a = [int(x) for x in input().split()]
if len(a) != num or 1 > num or num > 100:
	print('error')
	exit()
a.sort()
string = ''
for i in range(0, len(a)):
	string += ' ' + str(a[i])
print(string)


n = int(input())
arr = sorted(list(map(int, input().split())))
print(' '.join(map(str, arr)))


class check:
	n = 0
	c = []

	@classmethod
	def calc(self):
		n = int(input())
		self.c = [int(x) for x in input().split()]
		for i in range(n):
			for j in range(n - i - 1):
				self.sort(j)
		for x in self.c:
			print(x)

	@classmethod
	def sort(self, i):
		t = self.c[i]
		if t > self.c[i + 1]:
			self.c[i] = self.c[i + 1]
			self.c[i + 1] = t
o = check()
o.calc()


n = int(input())
a = input().split(' ')
c1 = []
c2 = []
res = []
for element in a:
	c1.append(int(element))
m = max(c1)
for i in range(m):
	c2.append([])
	for j in range(n):
		c2[i].append(0)
j = 0
for cubo in c1:
	tp = m - cubo
	while tp >= 0 and tp < m:
		c2[tp][j] = 1
		tp += 1
	j += 1

def flip(a):
	while a >= 0:
		for i in range(m):
			j = a
			while j < n - 1:
				if c2[i][j] == 1 and c2[i][j + 1] == 0:
					c2[i][j] = 0
					c2[i][j + 1] = 1
				j += 1
		a -= 1
flip(n - 2)
for j in range(n):
	k = 0
	for i in range(m):
		if c2[i][j] == 1:
			k += 1
	res.append(k)
for i in res:
	print(i, end=' ')


n = int(input())
array = [int(i) for i in input().split()]
array.sort()
array = [str(k) for k in array]
print(' '.join(array))


n = int(input())
d = [int(x) for x in input().split()]
d.sort()
for i in d:
	print(i, end=' ')


n = int(input())
col = list(map(int, input().split()))
n = n - 1
for i in range(n, 0, -1):
	for j in range(n, n - i, -1):
		if col[j] < col[j - 1]:
			tmp = col[j]
			col[j] = col[j - 1]
			col[j - 1] = tmp
for num in col:
	print(num, end=' ')


n = input()
columns = [int(x) for x in input().split()]
for x in sorted(columns):
	print(x, end=' ')


input()
ls = [int(x) for x in input().split()]
ls.sort()
ls = list(map(str, ls))
st = ' '.join(ls)
print(st)


n = int(input(''))
g = [int(x) for x in input('').split()]
g.sort()
for item in g:
	print(item, end=' ')


n = int(input())
arr = input().split()
for i in range(n):
	arr[i] = int(arr[i])
print(*sorted(arr))


n = input()
a = [int(x) for x in input().split(' ')]
a.sort()
for item in a:
	print(item, end=' ')


def main():
	import sys
	length = int(input())
	ls = list(map(int, input().rstrip().split(' ')))
	ls.sort()
	for x in ls:
		sys.stdout.write(str(x) + ' ')
main()


n = int(input())
l = list(map(int, input().split()))
l.sort()
for el in l:
	print(el, sep=' ', end=' ')


n = int(input())
s = [int(x) for x in input().split()]
s.sort(reverse=False)
t = [str(x) for x in s]
print(' '.join(t))


n = int(input())
cub = list(map(int, input().strip().split()))
cub.sort()
print(' '.join((str(i) for i in cub)))


n = int(input())
lst = list(map(int, input().strip().split(' ')))
lst.sort()
str1 = ''
for i in lst:
	str1 = str1 + str(i) + ' '
print(str1)


import sys
a = sys.stdin.readline()
b = map(int, sys.stdin.readline().strip().split(' '))
c = sorted(b)
print(*c)


input = __import__('sys').stdin.readline
n = int(input())
lis = sorted(map(int, input().split()))
print(*lis)


n = int(input())
a = [int(x) for x in input().split()]
a = sorted(a)
b = [str(y) for y in a]
print(' '.join(b))


n = int(input())
s = input()
ss = s.split()
for x in range(n - 1):
	for y in range(n - 1 - x):
		if int(ss[y]) > int(ss[y + 1]):
			(ss[y], ss[y + 1]) = (ss[y + 1], ss[y])
print(' '.join(ss))


num = input()
Line_1 = input().split(' ')
Line_2 = []
for thing in Line_1:
	Line_2.append(int(thing))
Line_2.sort()
string = ''
for x in range(len(Line_2) - 1):
	string += str(Line_2[x])
	string += ' '
string += str(Line_2[-1])
print(string)


n = int(input())
nums = sorted(map(int, input().split(' ')))
for num in nums:
	print(str(num), end=' ')


a = int(input())
b = list(map(int, input().split(' ')))
b.sort()
c = str(b[0])
for i in range(1, a):
	c += ' ' + str(b[i])
print(c)


n = int(input())
print(' '.join((str(c) for c in sorted([int(x) for x in input().split()]))))


def main():
	num = int(input())
	input_list = input().split(' ')
	numbers = []
	for i in input_list:
		numbers.append(int(i))
	numbers.sort()
	for item in numbers:
		print('%d' % item, end=' ')
main()


import sys
length = int(input())
thing = input()
thing = [int(x) for x in thing.split()]
thing.sort()
for num in thing:
	print(num, end=' ')


def gravity_flip(box):
	cubes = list(map(int, box.split()))
	flipped = []
	for _ in range(len(cubes)):
		min_ = min(cubes)
		flipped.append(min_)
		cubes.remove(min_)
	return flipped

def main():
	int(input())
	box = input()
	box_fliped = gravity_flip(box)
	out = ''
	for cube in box_fliped:
		out += str(cube) + ' '
	print(out[:-1])
main()


numColumns = int(input())
cubesPerColumn = input().split()
validNums = []
for i in range(numColumns):
	validNums.append(int(cubesPerColumn[i]))
validNums.sort()
print(' '.join(map(str, validNums)))


n = int(input())
arr = [int(x) for x in input().split()]
print(' '.join((str(x) for x in sorted(arr, key=lambda x: x))))


x = int(input())
li = []
for x in map(int, input().split()):
	li.append(x)
li.sort()
s = 0
while s < len(li):
	print(li[s], end=' ')
	s += 1


x = int(input())
a = list(map(int, input().split()))
a.sort()
print(*a)


n = int(input())
ls = [int(x) for x in input().split()]
for val in sorted(ls):
	print(val, end=' ')


N = int(input())
towers = input().split()
towers = list(map(int, towers))
towers.sort()
n = 0
while n < N:
	print(towers[n], end=' ')
	n += 1


n = int(input())
columns = input()
columns = columns.split()
columns2 = []
for i in columns:
	columns2.append(int(i))
columns2.sort()
columns3 = []
for i in columns2:
	columns3.append(str(i))
columns3 = ' '.join(columns3)
print(columns3)


n = int(input())
lis = list(map(int, input().split()))
for i in range(n):
	for j in range(n - i):
		if lis[-j - 1] < lis[i]:
			temp = lis[i] - lis[-j - 1]
			lis[-j - 1] += temp
			lis[i] -= temp
print(*lis, sep=' ')


number_of_cols = input()
res = sorted(input().split(), key=int)
print(' '.join(res))


def transformaInt(lista):
	for i in range(len(lista)):
		lista[i] = int(lista[i])
numColunas = int(input())
cubos = input().split()
transformaInt(cubos)
for i in range(len(cubos) - 1, 0, -1):
	j = i
	while cubos[j - 1] > cubos[j]:
		diferenca = cubos[j - 1] - cubos[j]
		cubos[j - 1] -= diferenca
		cubos[j] += diferenca
		j += 1
		if j == len(cubos):
			break
print(*cubos, sep=' ')
print()


n = int(input())
temp_list = str(input()).split()
temp_list = [int(it) for it in temp_list]
temp_list.sort()
temp_list = [str(it) for it in temp_list]
print(' '.join(temp_list))


n = int(input())
a = list(map(int, input().split()))
for i in range(len(a) - 2, -1, -1):
	if a[i] <= a[i + 1]:
		a[i] = a[i]
	else:
		while i < n - 1 and a[i] > a[i + 1]:
			c = a[i] - a[i + 1]
			a[i] = a[i] - c
			a[i + 1] = a[i + 1] + c
			i += 1
for i in a:
	print(i, end=' ')


n = int(input())
a = list(map(int, input().split()))
A = a[:]
A.sort()
if A == a:
	print(*a)
else:
	print(*A)


C = int(input())
cols = [int(i) for i in input().split(' ')]
cols.sort()
cols = map(lambda x: str(x), cols)
print(' '.join(cols))


def read_data():
	n = int(input().strip())
	a = list(map(int, list(input().strip().split())))
	return (n, a)

def solve():
	sol = -1
	for i in range(n - 1):
		if a[i + 1] - a[i] > sol:
			sol = a[i + 1] - a[i]
	return max(sol / 2, a[0], m - a[n - 1])
(n, a) = read_data()
a.sort()
print(*a)


n = int(input())
a = list(map(int, input().strip().split()))[:n]
a.sort()
for ele in a:
	print(ele, end=' ')


input()
nums = [int(x) for x in input().split()]
for num in sorted(nums):
	print(num, end=' ')


n = int(input())
a = [int(i) for i in input().split()]
zuida = max(a)
l = []
zidian = {}
for i in range(1, zuida + 1):
	zidian[i] = a.count(i)
for i in range(1, zuida + 1):
	for j in range(1, zidian[i] + 1):
		l.append(i)
s = ''
for i in range(len(l)):
	s = s + ' ' + str(l[i])
s = s[1:]
print(s)


def inplst():
	return list(map(int, input().split()))
n = int(input())
l = inplst()
l.sort()
for i in l:
	print(i, end=' ')


n = input().split()
data = input().split()
for (i, d) in enumerate(data):
	data[i] = int(d)
data.sort()
ret = ''
for d in data:
	ret += str(d)
	ret += ' '
print(ret[:-1])


count = int(input())
line = str(input())
line = list(map(int, line.split(' ')))
line.sort()
for i in range(count):
	line[i] = str(line[i])
print(' '.join(line))


num = input()
list = [int(i) for i in input().split()]
list = sorted(list)
out = str(list[0])
for item in list[1:len(list)]:
	out += ' ' + str(item)
print(out)


n = int(input())
a = [int(x) for x in input().split()]
for i in range(0, n):
	mini = i
	for j in range(i + 1, n):
		if a[j] < a[mini]:
			mini = j
	(a[mini], a[i]) = (a[i], a[mini])
for i in range(0, n):
	print(a[i], end=' ')


n = int(input())
num = list(map(int, input().strip().split()))[:n]
num.sort()
for i in range(n):
	print(num[i], end=' ')


number = int(input())
ListNum = [int(n) for n in input().split()]
(srtd, numbers) = ([], [])
for i in range(max(ListNum) + 1):
	if i in ListNum:
		numbers += [i]
		srtd += [ListNum.count(i)]
ListNum = []
for q in range(len(numbers)):
	ListNum += [numbers[q]] * srtd[q]
print(*ListNum)


n = int(input())
a = [int(string) for string in input().split()]
a.sort()
print(' '.join([str(ai) for ai in a]))


n = int(input())
a = list(map(int, input().split()))

def gravity_flip(n, lista):
	for i in range(n - 1):
		for j in range(n - 1 - i):
			if lista[i] > lista[n - 1 - j]:
				mayor = lista[i]
				menor = lista[n - 1 - j]
				lista[n - 1 - j] = mayor
				lista[i] = menor
	return lista
output = gravity_flip(n, a)
print(' '.join(map(str, output)))


_ = input()
heights = list(map(int, input().split()))
print(' '.join(list(map(str, sorted(heights)))))


def solve():
	n = int(input())
	a = input().split()
	for i in range(len(a)):
		a[i] = int(a[i])
	for i in range(len(a) - 2, -1, -1):
		for j in range(i, len(a) - 1):
			if a[j] > a[j + 1]:
				d = a[j] - a[j + 1]
				a[j] -= d
				a[j + 1] += d
	ans = ''
	for k in a:
		ans += str(k) + ' '
	print(ans)
solve()


def solve(n, A):
	return sorted(A)
n = int(input())
in_ = map(int, input().split(' '))
temp = []
for x in in_:
	temp.append(int(x))
print(*solve(n, temp))


x = int(input())
a = list(map(int, input().strip().split()))[:x]
x = ''
a.sort()
for i in a:
	x += str(i) + ' '
print(x)


c = int(input())
rows = [int(x) for x in input().split()]
rows.sort()
for i in rows:
	print(i, end=' ')


size = int(input())
arr = list(map(int, input().split()))
arr.sort()
for i in arr:
	print(i, end=' ')


from sys import stdin
number = stdin.readline()
columns_dict = dict()
columns = sorted([int(value) for value in stdin.readline().strip('\n').split()])
print(' '.join((str(value) for value in columns)))


a = int(input())
ab = list(map(int, input().split()))
ab.sort()
for i in range(len(ab)):
	print(ab[i], end=' ')


def gravity(line1, line2):
	heights = [int(num) for num in line2.split(' ')]
	rows = max(heights)
	A = []
	for height in heights:
		column = [0] * rows
		for i in range(height):
			column[rows - 1 - i] = 1
		A.append(column)
	cols = len(heights)
	for row in range(rows):
		for k in range(cols):
			for col in range(cols - 1):
				if A[col][row] == 1 and A[col + 1][row] == 0:
					A[col + 1][row] = 1
					A[col][row] = 0
	sums = []
	for col in A:
		sums.append(str(sum(col)))
	print(' '.join(sums))
gravity(input(), input())


import sys
n = int(sys.stdin.readline())
numbers = sorted([int(ele) for ele in sys.stdin.readline()[:-1].split()])
for (i, ele) in enumerate(numbers):
	print(int(ele), end=' ')


x = int(input())
l = list(map(int, input().split()))
print(*sorted(l))


n = int(input())
ls = map(int, input().split())
a = list(ls)
a.sort()
for x in a:
	print(x, end=' ')


n = int(input())
a = list(map(int, input().split()))
l = []
for i in range(1, max(a) + 1):
	s = 0
	for j in range(n):
		if a[j] >= i:
			s += 1
	l.append(s)
for i in range(n):
	s = 0
	for j in range(len(l)):
		if l[j] >= n - i:
			s += 1
	print(s, end=' ')


input()
b = [int(x) for x in input().split()]
b.sort()
x = map(str, b)
print(' '.join(x))


a = int(input())
b = input()
b = list(map(int, b.split()))
c = []
while b:
	c.append(min(b))
	b.remove(min(b))
d = ' '.join((str(i) for i in c))
print(d)


x = input()
y = list(map(int, input().split()))
y.sort()
for i in y:
	print(str(i), end=' ')


n = int(input())
a = list(map(int, input().split()))
for i in range(n - 1, 0, -1):
	for j in range(i - 1, -1, -1):
		if a[j] - a[i] > 0:
			diff = a[j] - a[i]
			a[i] += diff
			a[j] -= diff
print(' '.join([str(v) for v in a]))


columnas = int(input(''))
lista = [0] * columnas
string = ''
cadena = str(input(''))
cadena1 = cadena.split(' ')
for i in range(columnas):
	lista[i] = int(cadena1[i])
for i in range(columnas):
	for j in range(columnas - 1):
		if lista[j] > lista[j + 1]:
			resta = lista[j] - lista[j + 1]
			lista[j] -= resta
			lista[j + 1] += resta
for i in lista:
	string += str(i) + ' '
print(string)


n = int(input())
x = [int(x) for x in input().split()]
x.reverse()
i = 0
while i < n - 1:
	if x[i] < x[i + 1]:
		d = x[i + 1] - x[i]
		x[i + 1] = x[i + 1] - d
		x[i] = x[i] + d
		i -= 1
		if i < 0:
			i = 0
	else:
		i += 1
		if i >= n - 1:
			break
x.reverse()
print(*x)


n = int(input())
arr = [int(i) for i in input().split()]
b = sorted(arr)
print(' '.join(map(str, b)))


import sys
from sys import stdin, stdout

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

def get_string():
	return sys.stdin.readline().strip()
n = int(input())
arr = [0] * n
arr = get_ints()
for i in range(0, n):
	for k in range(i, n):
		if arr[i] > arr[k]:
			temp = arr[k]
			arr[k] = arr[i]
			arr[i] = temp
print(*arr)


n = input()
s = input()
data = s.split()
data.sort(key=int)
length_T = len(data)
for y in range(0, length_T):
	print(data[y], end=' ')


n = int(input())
numbers = [int(num) for num in input().split(' ')]
numbers.sort()
print(' '.join(map(str, numbers)))


w = input()
ai = str(input()).split(' ')
for i in range(len(ai)):
	ai[i] = int(ai[i])
ai = sorted(ai)
for i in range(len(ai)):
	print(ai[i], end=' ')


_ = input()
box = input()
box = sorted([int(s) for s in box.split()])
print(' '.join([str(s) for s in box]))


input()
x = map(int, input().split())
o = ''
for i in sorted(x):
	o = o + str(i) + ' '
print(o)


a = int(input())
b = list(map(int, input().split()[:a]))
c = ''
for i in range(a):
	c += str(min(b)) + ' '
	b.remove(min(b))
print(c[:-1])


k = int(input())
ar = list(map(int, input().split()))
ar.sort()
print(*ar)


from sys import stdin, stdout, exit as sys_ret
(f_input, f_print, f_flush) = (stdin.readline, stdout.write, stdout.flush)
amount = int(f_input())
entrance = sorted([int(_) for _ in f_input().split()])
f_print(' '.join([str(_) for _ in entrance]))


_ = int(input())
x = sorted([int(a) for a in input().split()])
print(' '.join(map(str, x)))


input()
ab = [int(i) for i in input().split()]
ab.sort()
for i in ab:
	print(i, end=' ')


x = int(input())
arr = (int(x) for x in input().split())
arr1 = sorted(arr)
for i in range(x):
	print(arr1[i])


col = int(input())
inp = input()
numbers = inp.split()
for i in range(len(numbers)):
	numbers[i] = int(numbers[i])
numbers.sort()
for i in numbers:
	print(i, end=' ')


N = int(input())
V = map(int, input().split())
print(' '.join(map(str, sorted(V))))


columnas = int(input())
datos = list(str(input()).split())
orden = []
for j in range(len(datos)):
	datos[j] = int(datos[j])
for j in range(len(datos)):
	minimo = 0
	for i in range(len(datos)):
		if datos[i] <= datos[minimo]:
			minimo = i
	orden.append(datos[minimo])
	datos.remove(datos[minimo])
for j in range(len(orden)):
	orden[j] = str(orden[j])
respuesta = ' '.join(orden)
print(respuesta)


n = int(input())
a = list(map(int, input().split()))
a.reverse()
q = -1
for i in range(n):
	q += 1
	for h in range(q, n):
		if a[i] < a[h]:
			(a[i], a[h]) = (a[h], a[i])
a.reverse()
print(' '.join((str(x) for x in a)))


a = int(input())
b = list(map(int, input().split()))
b.sort()
for number in b:
	print(number, ' ')


n = int(input())
col = input().split(' ')
lst = [int(i) for i in col]
lst.sort()
for i in lst:
	print(i, end=' ')


n = int(input())
nums = [int(s) for s in input().split()]
nums.sort()
for i in nums:
	print(i, end=' ')


y = int(input())
x = list(map(int, input().split()))
x.sort()
print(*x)


n = int(input())
ar = list(map(int, input().split()))
p = n - 1
if n == 2:
	x = ar[1] - ar[0]
	if x < 0:
		ar[1] = ar[1] + abs(x)
		ar[0] = ar[0] - abs(x)
else:
	while p > 1:
		for i in range(p):
			x = ar[p] - ar[i]
			if x < 0:
				ar[p] = ar[p] + abs(x)
				ar[i] = ar[i] - abs(x)
		p = p - 1
print(*ar)


n = int(input())
l = list(map(int, input().split()))
m = len(l)
for i in range(m):
	for j in range(i + 1, m):
		if l[j] < l[i]:
			temp = l[i]
			l[i] = l[j]
			l[j] = temp
for i in l:
	print(i, end=' ')


ln = int(input())
blks = sorted(list(map(int, input().split(' '))))
print(' '.join(map(str, blks)))


n = int(input())
A = [int(i) for i in input().split()]
A.sort()
for i in range(n - 1):
	A.insert(2 * i + 1, ' ')
for i in range(2 * n - 1):
	A[i] = str(A[i])
print(''.join(A))


column = int(input())
boxLine = input()
boxList = boxLine.split(' ')
boxList.sort(key=int)
print(' '.join(boxList))


input()
ls = sorted([int(x) for x in list(input().split())])
for x in ls:
	print(x, end=' ')


n = int(input())
lt = list(map(int, input().split()))
lt.sort()
print(' '.join(map(str, lt)))


from collections import *
from math import *
from sys import *
n = int(input())
l = list(map(int, input().split()))
l.sort()
for i in l:
	print(i, end=' ')


i = int(input())
n = [int(x) for x in input().split()]
n.sort()
for e in range(i):
	if e - 1 == i:
		print(n[e])
	else:
		print(n[e], end=' ')


a = int(input())
b = map(int, input().split())
c = sorted(b)
print(*c)


n = int(input())
lt = list(input().split())
for i in range(n):
	lt[i] = int(lt[i])
lt.sort()
for i in lt:
	print(i, end=' ')


n = int(input())
mas = [int(i) for i in input().split()]
mas.sort()
for i in mas:
	print(i, end=' ')


numberofcubes = int(input())
cubes = input().split()
for i in range(numberofcubes):
	cubes[i] = int(cubes[i])
cubes = sorted(cubes)
for i in cubes:
	print(i, end=' ')


n = int(input())
column = [int(i) for i in input().split(' ')]
row = [0] * max(column)
for i in range(n):
	N = column[i]
	for i in range(N):
		row[i] += 1
column_1 = [0] * n
for i in range(len(row)):
	M = row[i]
	for i in range(M):
		column_1[i] += 1
l = list(reversed(column_1))
l = [str(i) for i in l]
print(' '.join(l))


x = int(input())
y = list(map(int, input().split()))
y = sorted(y)
s = ''
for i in y:
	s += str(i) + ' '
print(s)


n = input()
nums = map(int, input().split())
print(*sorted(nums))


n = int(input())
a = []
a.append(list(map(int, input().split())))
a.sort()
b = []
for i in range(1):
	for j in range(n):
		b.append(a[i])
b[0].sort()
print(*b[0])


n = int(input())
l = list(map(int, input().split()))
(k, h) = ([0] * max(l), [0] * n)
for i in range(max(l)):
	for j in l:
		if j >= i + 1:
			k[i] += 1
for i in k:
	for j in range(i):
		h[n - j - 1] += 1
for j in h:
	print(j, end=' ')


n = int(input())
print(' '.join([str(v) for v in sorted([int(val) for val in input().split()])]))


def invalidador(lista):
	for i in lista:
		if i < 1 or i > 100:
			return 1
		else:
			continue
columns = 0
invalido = True
while columns < 1 or columns > 100:
	columns = int(input())
caixas = list()
while invalido:
	caixas = list(map(int, input().split(' ')))
	if len(caixas) != columns or invalidador(caixas):
		invalido = 1
	else:
		invalido = 0
print(' '.join(map(str, sorted(caixas))))


def bubbleSort(alist):
	for passnum in range(len(alist) - 1, 0, -1):
		for i in range(passnum):
			if int(alist[i]) > int(alist[i + 1]):
				temp = alist[i]
				alist[i] = alist[i + 1]
				alist[i + 1] = temp
n = int(input())
arr = input().split(' ')
bubbleSort(arr)
print(' '.join(arr))


def sort(l, n):
	sortaux(l, 0, n - 1)

def sortaux(l, start, end):
	if start < end:
		pivot = partition(l, start, end)
		sortaux(l, start, pivot - 1)
		sortaux(l, pivot + 1, end)

def partition(l, start, end):
	pivVal = l[start]
	left = start + 1
	right = end
	done = False
	while not done:
		while left <= right and l[left] <= pivVal:
			left += 1
		while l[right] >= pivVal and right >= left:
			right -= 1
		if right < left:
			done = True
		else:
			(l[left], l[right]) = (l[right], l[left])
	(l[start], l[right]) = (l[right], l[start])
	return right
n = int(input(''))
aList = list(map(int, input('').split(' ')))
sort(aList, n)
string = str(aList[0])
for i in range(1, n):
	string += ' ' + str(aList[i])
print(string)


n = int(input())
t = input().split()
m = []
for i in t:
	m.append(int(i))
h = sorted(m)
for i in h:
	print(i, end=' ')


n = int(input())
columns = list(map(int, input().split()))
columns.sort()
print(*columns)


cols = input()
row = []
numberOfCubesPerCol = input()
cubesList = numberOfCubesPerCol.split(' ')
cubesList = list(map(int, cubesList))
cubesList.sort(key=int)
cubesString = ''
counter = 0
for i in cubesList:
	cubesString += str(i)
	counter += 1
	if counter < len(cubesList):
		cubesString += ' '
print(cubesString)


n = int(input())
b = list(map(int, input().split()))
t = [[0] * n for i in range(max(b))]
for i in range(n):
	for j in range(b[i]):
		t[j][i] = 1
for i in range(max(b)):
	c = 0
	for j in range(n):
		c += t[i][j]
	t[i] = [0] * (n - c) + [1] * c
r = ''
for i in range(n):
	c = 0
	for j in range(max(b)):
		c += t[j][i]
	r += str(c) + ' '
print(r)


from sys import stdin, stdout
column = int(stdin.readline())
boxes = [int(i) for i in stdin.readline().split()]
stdout.write(' '.join(list(map(str, sorted(boxes)))))


N_Columna = int(input())
C_Columna = input()
C_columna1 = C_Columna.split()
for i in range(len(C_columna1)):
	C_columna1[i] = int(C_columna1[i])
r = sorted(C_columna1)
for i in range(len(r)):
	print(r[i], end=' ')


n = int(input())
line = input()
L = [int(i) for i in line.split()]
L.sort()
for i in L:
	print(i, end=' ')


import sys
col_num = input()
col_list = input().split()
col_list = list(map(int, col_list))
col_list.sort()
for num in col_list:
	print(num, end=' ')


def getInts():
	return [int(s) for s in input().split()]

def getInt():
	return int(input())

def getStrs():
	return [s for s in input().split()]

def getStr():
	return input()

def listStr():
	return list(input())

def solve():
	N = getInt()
	A = getInts()
	return sorted(A)
ans = solve()
print(*ans)


n = int(input())
lista = [int(x) for x in input().split()]
sort_list = sorted(lista)
for i in sort_list:
	print(i, end=' ')


n = int(input())
a = [int(x) for x in input().split()]
a.sort()
for unm in a:
	print(unm, end=' ')


n = int(input())
l = [int(i) for i in input().split()]
la = sorted(l)
s = ''
for i in range(n):
	s += str(la[i]) + ' '
print(s)


n = int(input())
nums = input().split()
lists = []
for i in range(n):
	lists.append(int(nums[i]))
lists.sort()
print(' '.join((str(i) for i in lists)))


def gravity_flip(n, vals):
	vals = [int(i) for i in vals.split()]
	vals.sort()
	out = ' '.join((str(j) for j in vals))
	print(out)
gravity_flip(int(input()), input())


k = input()
lst = sorted(map(int, input().split()))
for i in lst:
	print(i, end=' ')


def minim(arr, starts, end):
	minim = starts
	for i in range(starts, end):
		if arr[i] < arr[minim]:
			minim = i
	return minim

def selection_sort(arra):
	for i in range(0, len(arra)):
		min_index = minim(arra, i, len(arra))
		temp = arra[i]
		arra[i] = arra[min_index]
		arra[min_index] = temp
	return arra
n = int(input())
arr = list(map(int, input().split()))
print(*selection_sort(arr))


import sys
n = int(sys.stdin.readline().rstrip())
s = list(map(int, sys.stdin.readline().rstrip().split(' ')))
s = list(map(str, sorted(s)))
print(' '.join(s))


n = int(input())
l = [int(n) for n in input().split()]
l1 = sorted(l)
if l1 == l:
	for i in range(len(l)):
		print(l[i], end=' ')
else:
	for i in range(len(l) - 1):
		pos = l.index(max(l[:n - i]))
		(l[pos], l[n - i - 1]) = (l[n - i - 1], l[pos])
	for i in range(len(l)):
		print(l[i], end=' ')


n = int(input())
ni = input()
ni = ni.split()
ni = [int(a) for a in ni]
b = [0] * n
for i in range(0, n):
	if len(ni) > i:
		b[i] = ni[i]
b = sorted(b)
b = [str(ex) for ex in b]
print(' '.join(b))


T = int(input())
nums = list(map(int, input().split()))
nums.sort()
for num in nums:
	print(num, end=' ')


(z, zz) = (input, lambda : list(map(int, z().split())))
zzz = lambda : [int(i) for i in stdin.readline().split()]
(szz, graph, mod, szzz) = (lambda : sorted(zz()), {}, 10 ** 9 + 7, lambda : sorted(zzz()))
from string import *
from re import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f
from bisect import bisect as bs
from bisect import bisect_left as bsl
from itertools import accumulate as ac

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0 and x != 2 or x == 0:
			return 0
	return 1

def dfs(u, visit, graph):
	visit[u] = True
	for i in graph[u]:
		if not visit[i]:
			dfs(i, visit, graph)
z()
print(*szzz())


import numbers
x = int(input())
numbers = list(map(int, input().split()))
numbers.sort()
print(*numbers)


(n, r) = (int(input()), sorted(list(map(int, input().split()))))
print(*r)


import sys
input()
alist = list(map(int, sys.stdin.readline().split()))
print(' '.join([str(a) for a in sorted(alist)]))


a = int(input())
x = [int(x) for x in input().split()]
x.sort()
for i in range(a):
	print(x[i], end=' ')


n = str(input())
c = list(map(int, input().split()))
c.sort()
for i in c:
	print(i)


n = int(input())
lists = [int(i) for i in input().split(' ')]
lists.sort()
print(' '.join(list(map(str, lists))))


line = input()
blocks = input().split(' ')
for i in range(0, int(line)):
	blocks[i] = int(blocks[i])
blocks.sort()
print(*blocks, sep=' ')


n = int(input())
lis = [int(x) for x in input().split()]
print(' '.join([str(x) for x in sorted(lis)]))


columns = int(input(''))
values = input('')
values = values.split(' ')
for i in range(columns):
	values[i] = int(values[i])
values.sort()
for i in range(columns):
	values[i] = str(values[i])
print(' '.join(values))


n = int(input())
v = sorted(list(map(int, input().split())))
print(*v)


import sys
input = lambda : sys.stdin.readline().strip()
li = lambda : list(map(int, input().split()))
I = lambda : int(input())
n = I()
l = li()
print(*sorted(l))


n = int(input())
blocks = list(map(int, input().split()))
print(' '.join([str(column) for column in sorted(blocks)]))


n = int(input())
lad = list(map(int, input().strip().split()))
lad.sort()
print(*lad, sep=' ')


n = int(input())
columns = [int(x) for x in input().split(' ')]
print(' '.join([str(x) for x in sorted(columns)]))


n = int(input())
a = [int(x) for x in input().split()]
b = [0] * 100
c = [0] * n
for x in range(n):
	for y in range(a[x]):
		b[y] += 1
for x in range(100):
	for y in range(b[x]):
		c[n - y - 1] += 1
for x in range(n):
	print(c[x], end=' ')


i = int(input())
a = list(map(int, input().split()))
while i > 1:
	l = max(a[0:i - 1])
	if a[i - 1] < l:
		l - a[i - 1]
		a[a.index(l)] -= l - a[i - 1]
		a[i - 1] += l - a[i - 1]
	i -= 1
print(' '.join(map(str, a)))


def main():
	arr = []
	_ = input()
	arr.append(list(map(int, input().split())))
	res = arr[0]
	res = sorted(res)
	for i in res:
		print(str(i), end=' ')
main()


def main():
	x = int(input())
	y = str(input()).split()
	z = []
	for a in y:
		z.append(int(a))
	z.sort()
	for i in z:
		print(i, end=' ')
main()


n = int(input())
s = [int(x) for x in input().split()]
cube = []
for i in range(n):
	cube.append(str(min(s)))
	s.remove(min(s))
print(' '.join(cube))


n1 = int(input())
b = list(map(int, input().strip().split()))[:n1]
b.sort()
for i in b:
	print(i, end=' ')


trash = input()
tab = [int(x) for x in input().split()]
print(*sorted(tab))


input()
blocks = [int(b) for b in input().split()]
blocks.sort()
[print(b, end=' ') for b in blocks]


columns = input()
listOfInputs = input().split()
L = []
for i in listOfInputs:
	L.append(int(i))
l = sorted(L)
for n in range(len(l)):
	print(l[n], end=' ')


n = int(input())
cols = input().strip().split(' ')
col = [int(x) for x in cols]
aux = sorted(col)
print(' '.join([str(x) for x in aux]))


n = int(input())
line = sorted(list(map(int, input().rstrip().split())))
print(*line)


n = int(input())
cols = [int(x) for x in input().split()]
cols.sort()
for i in cols:
	print(i, end=' ')


z = int(input())
arr = list(map(int, input().split()))
arr.sort()
for item in arr:
	print(item, end=' ')


n = int(input())
a = [int(i) for i in input().split(' ')]
for i in range(len(a)):
	for j in range(len(a)):
		if a[i] < a[j]:
			temp1 = a[i]
			temp2 = a[j]
			a[j] -= temp2 - temp1
			a[i] += temp2 - temp1
s = ''
done = 0
for x in a:
	if x == a[0] and done == 0:
		s += str(x)
		done = 1
	else:
		s += ' ' + str(x)
print(s)


def merge(left, right, a):
	num_l = len(left)
	num_r = len(right)
	i = 0
	j = 0
	k = 0
	while i < num_l and j < num_r:
		if left[i] <= right[j]:
			a[k] = left[i]
			i += 1
		else:
			a[k] = right[j]
			j += 1
		k += 1
	while i < num_l:
		a[k] = left[i]
		k += 1
		i += 1
	while j < num_r:
		a[k] = right[j]
		k += 1
		j += 1

def merge_sort(a):
	n = len(a)
	if n < 2:
		return a
	mid = n // 2
	left = a[:mid]
	right = a[mid:n]
	merge_sort(left)
	merge_sort(right)
	merge(left, right, a)

def main():
	num_cols = int(input())
	a = [int(x) for x in input().split()]
	merge_sort(a)
	print(*a)
	return 0
import sys
sys.exit(main())


from sys import stdin

def main():
	stdin.readline()
	boxes = stdin.readline().split(' ')
	boxes = list(map(int, boxes))
	boxes.sort()
	boxes = list(map(str, boxes))
	print(' '.join(boxes))
main()


q = int(input())
w = list(map(int, input().split()))
w.sort()
for i in w:
	print(i, end=' ')


p = int(input())
a = list(map(int, input().split()))
for i in range(p - 1, 0, -1):
	for j in range(i, -1, -1):
		if a[i] < a[j]:
			(a[j], a[i]) = (a[i], a[j])
print(' '.join((str(a[i]) for i in range(p))))


n = int(input())
s = input().split()
maxx = 0
s1 = ''
for i in range(len(s)):
	if maxx < int(s[i]):
		maxx = int(s[i])
summ = [0 for i in range(maxx)]
count = [0 for i in range(maxx)]
st = [[0 for i in range(n)] for j in range(maxx)]
st1 = [[0 for i in range(n)] for j in range(maxx)]
for j in range(n):
	for i in range(maxx - int(s[j]), maxx):
		st[i][j] = 1
for i in range(0, maxx):
	t = 0
	num = 0
	for j in range(0, n):
		if st[i][j] == 0:
			t = j
	count[i] = t
	for j in range(t):
		if st[i][j] != 0:
			st[i][j] = 0
			summ[i] += 1
for i in range(maxx):
	while summ[i] > 0:
		st[i][count[i]] = -1
		summ[i] -= 1
		count[i] -= 1
ore = [0 for i in range(n)]
for j in range(n):
	for i in range(maxx):
		if st[i][j] != 0:
			ore[j] += 1
s = ''
for i in range(0, n - 1):
	s += str(ore[i]) + ' '
s += str(ore[n - 1])
print(s)


n = int(input())
listt = []
listt = list(input().split())
for i in range(n):
	listt[i] = int(listt[i])
listt.sort()
for i in range(n - 2, -1, -1):
	for j in range(n - i - 1):
		if listt[n - 1 - j] < listt[i]:
			listt[i] -= 1
			listt[n - 1 - j] += 1
print(*listt)


s = input()
t = input()
a = t.split(' ')
x = []
for i in a:
	x.append(int(i))
z = sorted(x)
ans = ' '.join((str(i) for i in z))
print(ans)


n = int(input())
list1 = [int(i) for i in input().split()]
list1.sort()
list1 = [str(i) for i in list1]
print(' '.join(list1))


n = int(input())
a = list(map(int, input().split()))
cnt = [0] * 101
for i in a:
	cnt[i] += 1
ans = [0] * 100
for i in range(n - 1, -1, -1):
	for j in range(100, 0, -1):
		if cnt[j] > 0:
			ans[i] = j
			cnt[j] -= 1
			break
print(*ans[:n])


b = []
x = int(input())
if 1 <= x and x <= 100:
	c = [int(v) for v in input().split()]
	for z in c:
		if 1 <= z and z <= 100:
			b.append(z)
		else:
			break
	if len(c) == x and len(b) == x:
		b.sort()
		print(*b)


n = int(input())
cajas = input().split(' ')
for i in range(n):
	cajas[i] = int(cajas[i])
print(' '.join((str(x) for x in sorted(cajas))))


n = int(input())
mas = list(map(int, input().split()))
mas.sort()
print(*mas)


n = int(input())
aa = [int(i) for i in input().split()]
aa.sort()
print(*aa)


length = int(input())
L = sorted(list(map(int, input().split())))
for i in range(length):
	print(L[i], end=' ')


n = int(input())
a = [int(x) for x in input().split()]
a.sort()
if a:
	print(a[0], end='')
	for i in range(1, len(a)):
		print(' ', end='')
		print(a[i], end='')
	print('')


_ = input()
output_list = list(map(int, input().split()))
output_list.sort()
for num in output_list:
	print(num, end=' ')


import random

def seperateints(x):
	k = ''
	l = []
	for i in x:
		if i == ' ':
			l.append(int(k))
			k = ''
			continue
		k = k + i
	l.append(int(k))
	return l

def luckynum(x):
	for i in x:
		if i != '4' and i != '7':
			return False
	return True

def greatercommondivisor(a, b):
	if a == 0:
		return b
	if b == 0:
		return a
	if a == b:
		return a
	if a > b:
		k = b
		while True:
			if a % k == 0 and b % k == 0:
				return k
			k -= 1
	if b > a:
		k = a
		while True:
			if a % k == 0 and b % k == 0:
				return k
			k -= 1
n = int(input())
l = seperateints(input())
k = sorted(l)
kk = ''
for i in range(len(k)):
	if i == len(k) - 1:
		kk = kk + str(k[i])
		break
	kk = kk + str(k[i]) + ' '
print(kk)


def partition(arr, low, high):
	i = low - 1
	pivot = arr[high]
	for j in range(low, high):
		if arr[j] <= pivot:
			i = i + 1
			(arr[i], arr[j]) = (arr[j], arr[i])
	(arr[i + 1], arr[high]) = (arr[high], arr[i + 1])
	return i + 1

def quickSort(arr, low, high):
	if low < high:
		pi = partition(arr, low, high)
		quickSort(arr, low, pi - 1)
		quickSort(arr, pi + 1, high)
a = int(input())
arr = [int(i) for i in input().strip('').split(' ')]
n = len(arr)
quickSort(arr, 0, n - 1)
arr2 = []
for i in range(n):
	arr2.append(str(arr[i]))
print(' '.join(arr2))


n = int(input())
A = [int(x) for x in input().split()]
A.sort()
print(*A)


def gravitacya(lst):
	return sorted(lst)
n = int(input())
a = [int(i) for i in input().split()]
print(*gravitacya(a))


cols = int(input(''))
inputs = input('')
inputList = inputs.split(' ')
inputList.sort(key=int)
for i in inputList:
	print(i, end=' ')


import sys
from sys import stdin, stdout
import math
import random
import heapq
from collections import Counter
from functools import lru_cache
try:
	for _ in range(1):
		n = int(input())
		arr = [int(i) for i in input().split()]
		arr.sort()
		print(*arr)
except EOFError as e:
	print(e)


x = int(input())
tmp = [int(i) for i in input().split()]
y = max(tmp)
matrix = [[0 for j in range(x)] for i in range(y)]
for i in range(x):
	for j in range(tmp[i]):
		matrix[j][i] = 1
for j in range(y):
	matrix[j].sort()
for i in range(x):
	c = 0
	for j in range(y):
		c += matrix[j][i]
	print(c, end=' ')


n = int(input())
box = list(map(int, input().split()))
for k in range(n - 1):
	for i in range(len(box) - 1):
		j = len(box) - i - 1
		if box[j - 1] > box[j]:
			temp = box[j - 1] - box[j]
			box[j] = box[j] + temp
			box[j - 1] = box[j - 1] - temp
for i in box:
	print(i)


n = int(input())
a = [int(i) for i in input().split()]
box = [[0] * 100 for i in range(n)]
for i in range(n):
	for j in range(a[i]):
		box[i][j] = 1
rows = []
for i in range(max(a)):
	row = 0
	for j in range(n):
		if box[j][i] == 1:
			row += 1
	rows.append(row)
for i in range(1, n + 1):
	for j in range(len(rows)):
		if i <= rows[j]:
			box[-i][j] = 1
		else:
			box[-i][j] = 0
ans = ''
for collumn in box:
	ans += str(sum(collumn)) + ' '
print(ans[:-1])


from sys import stdin, stdout
import math

def main():
	cols = None
	blocks = None
	cols = input()
	blocks = input().split()
	result = sorted(blocks, key=int)
	print(*result)
main()


n = int(input())
arr = [int(x) for x in input().split()]
arr.sort()
print(*arr)


def xxx():
	a = int(input())
	b = input()
	b = b.split(' ')
	for i in range(len(b)):
		b[i] = int(b[i])
	c = ''
	sorting(b)
	for i in range(len(b)):
		c = c + str(b[i])
		c = c + ' '
	print(c)

def sorting(list):
	for i in range(len(list)):
		min = len(list) - 1
		for j in range(i, len(list)):
			if list[j] < list[min]:
				min = j
		temp = list[i]
		list[i] = list[min]
		list[min] = temp
	return list
xxx()


number_of_integer = int(input())
number_of_columns = input().strip().split()
separated_integer_numbers = list(number_of_columns)
for ith_column in range(0, number_of_integer):
	separated_integer_numbers[ith_column] = int(separated_integer_numbers[ith_column])
separated_integer_numbers.sort()
for ith_column in range(0, number_of_integer):
	separated_integer_numbers[ith_column] = str(separated_integer_numbers[ith_column])
output_gravity = ' '.join(separated_integer_numbers)
print(output_gravity)


a = int(input())
l = list(map(int, input().split()))
l.sort()
for i in l:
	if i == l[-1]:
		print('%d' % i)
	else:
		print('%d' % i, end=' ')


t = input()
arr = input().split()
arr = [int(n) for n in arr]
arr = sorted(arr)
arr = [str(n) for n in arr]
print(' '.join(arr))


n = int(input())
xs = []
for x in input().split():
	xs.append(int(x))
for x in sorted(xs):
	print(x, end=' ')


n = int(input())
num = str(input()).split()
arr = []
for i in range(n):
	arr += [int(num[i])]
for i in range(n):
	for j in range(i + 1, n):
		if arr[i] > arr[j]:
			temp = arr[i]
			arr[i] = arr[j]
			arr[j] = temp
	print(arr[i], end=' ')


n = int(input())
import re
start = [int(i) for i in re.findall('\\d+\\s', input() + ' ')]
hei = max(start)
horizonal = []
for i in range(hei):
	row = []
	for j in range(n):
		if i < start[j]:
			row.append(1)
		else:
			row.append(0)
	row.sort()
	horizonal.append(row)
after = []
for i in range(n):
	after.append(str(sum([horizonal[j][i] for j in range(hei)])))
print(' '.join(after))


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
x = inp()
y = inlt()
y.sort()
print(*y, sep=' ')


import sys

def gravityFlip(cols, ints):
	for idx in range(0, cols - 1):
		for col in range(0, cols - 1):
			if int(ints[col]) > int(ints[col + 1]):
				temp = int(ints[col]) - int(ints[col + 1])
				ints[col] = int(ints[col]) - temp
				ints[col + 1] = int(ints[col + 1]) + temp
	for num in ints:
		print(int(num), end=' ')

def main():
	cols = int(input())
	ints = input().split()
	return gravityFlip(cols, ints)
main()


column = int(input())
cubes = [int(x) for x in input().split()]
cubes.sort()
cubes = [str(x) for x in cubes]
print(' '.join(cubes))


n = int(input())
s = list(map(int, input().split()))
b = ''
a = []
r = 0
for i in range(n):
	a.append(s[i])
a.sort()
for i in range(n):
	b += str(a[i]) + ' '
print(b)


n = int(input())
strarr = str(input())
arr = strarr.split()
for i in range(len(arr)):
	arr[i] = int(arr[i])
arr.sort()
strarr = ''
for i in arr:
	strarr += ' ' + str(i)
strarr = strarr[1:len(strarr)]
print(strarr)


n = int(input())
cubes = list(map(int, input().split()))
for i in range(n):
	for m in range(i + 1, n):
		if cubes[m] < cubes[i]:
			new = cubes[i]
			cubes[i] = cubes[m]
			cubes[m] = new
print(*cubes, sep=' ')


n = int(input())
l = [int(x) for x in input().split()]
print(' '.join(map(str, sorted(l))))


n = int(input())
toy_box = input()
toy_box = list(toy_box.split(' '))
for i in range(n):
	toy_box[i] = int(toy_box[i])
toy_box.sort()
for i in range(n):
	toy_box[i] = str(toy_box[i])
toy_box_string = ''
for i in toy_box:
	toy_box_string += i
	toy_box_string += ' '
print(toy_box_string)


import sys
numCols = int(sys.stdin.readline())
vals = sys.stdin.readline()
valList = vals.split()
for i in range(len(valList)):
	valList[i] = int(valList[i])
valList.sort()
result = ''
for val in valList:
	result += str(val) + ' '
result.strip()
print(result)


class max_heap:

	def __init__(self):
		self.a = ['$']
		self.size = 0

	def push(self, x):
		self.size += 1
		if len(self.a) <= self.size:
			self.a.append(x)
		else:
			self.a[self.size] = x
		i = self.size
		while i > 1:
			p = i >> 1
			if self.a[p] < self.a[i]:
				(self.a[p], self.a[i]) = (self.a[i], self.a[p])
			i = p

	def top(self):
		return self.a[1]

	def empty(self):
		return self.size == 0

	def pop(self):
		(self.a[1], self.a[self.size]) = (self.a[self.size], self.a[1])
		self.size -= 1
		i = 1
		while True:
			L = i << 1
			R = L + 1
			if L > self.size:
				break
			elif L == self.size or self.a[L] >= self.a[R]:
				k = L
			else:
				k = R
			if self.a[k] >= self.a[i]:
				(self.a[i], self.a[k]) = (self.a[k], self.a[i])
				i = k
			else:
				break

	def print(self):
		print(*self.a[1:self.size + 1])
n = int(input())
a = [int(x) for x in input().split()]
frontier = max_heap()
for x in a:
	frontier.push(x)
s = []
while not frontier.empty():
	s.append(frontier.top())
	frontier.pop()
print(*s[::-1])


x = int(input())
li = list(map(int, input().split(' ')))
li.sort()
print(*li, sep=' ')


input()
s = [int(x) for x in input().split()]
s.sort()
for x in s:
	print(x, end=' ')
print()


n = int(input())
initial = input().split()
for i in range(n):
	initial[i] = int(initial[i])
final = []
while len(initial) > 0:
	minimum = min(initial)
	final.append(minimum)
	initial.remove(minimum)
for i in range(n):
	print(final[i], end=' ')


def merge_sort(aList):
	if len(aList) == 1:
		return aList
	lefthalf = aList[0:len(aList) // 2]
	righthalf = aList[len(aList) // 2:len(aList)]
	lefthalf = merge_sort(lefthalf)
	righthalf = merge_sort(righthalf)
	return merge(lefthalf, righthalf)

def merge(lefthalf, righthalf):
	merged = []
	while len(lefthalf) != 0 and len(righthalf) != 0:
		if lefthalf[0] >= righthalf[0]:
			merged.append(righthalf[0])
			righthalf.pop(0)
		else:
			merged.append(lefthalf[0])
			lefthalf.pop(0)
	while len(lefthalf) != 0:
		merged.append(lefthalf[0])
		lefthalf.pop(0)
	while len(righthalf) != 0:
		merged.append(righthalf[0])
		righthalf.pop(0)
	return merged
n = int(input())
sList = list(map(int, input().split(' ')))
sList = merge_sort(sList)
print(' '.join([str(i) for i in sList]))


n = input()
s = list(map(int, input().split()))
s.sort()
for i in range(len(s)):
	a = str(s.pop(0))
	s.append(a)
print(' '.join(s))


n = int(input())
rows = list(map(int, input().split()))
dic = {i + 1: 0 for i in range(max(rows))}
for el in rows:
	for i in range(el):
		dic[i + 1] += 1
output = ''
for i in range(n):
	count = 0
	for row in dic:
		if dic[row] >= n - i:
			count += 1
	if i != n - 1:
		output += '{} '.format(count)
	else:
		output += '{}'.format(count)
print(output)


n = int(input())
a = list(map(int, input().split()))
for x in range(n):
	for i in range(n - 1):
		if a[i] > a[i + 1]:
			m = a[i + 1]
			a[i + 1] = a[i]
			a[i] = m
for s in range(n):
	print(int(a[s]))


n = int(input())
l = sorted(list(map(int, input().split())))
for i in range(n - 1):
	print(l[i], end=' ')
print(l[n - 1])


def gravity_boxes():
	total = int(input())
	boxes = input().split()
	while True:
		change = False
		for i in range(1, len(boxes)):
			if int(boxes[i]) < int(boxes[i - 1]):
				temp = int(boxes[i - 1]) - int(boxes[i])
				boxes[i] = int(boxes[i]) + temp
				boxes[i - 1] = int(boxes[i - 1]) - temp
				change = True
		if not change:
			break
	output = ''
	output = output + str(boxes[0])
	for i in range(1, len(boxes)):
		output = output + ' ' + str(boxes[i])
	print(output)
gravity_boxes()


n = int(input())
s = [int(x) for x in input().split()]
s.sort()
print(*s)


n = int(input())
cubes = []
[cubes.append(int(i)) for i in input().split()]
cubes = list(map(str, sorted(cubes)))
print(' '.join(cubes))


import sys
line = input()
numCols = int(line)
line2 = input().split(' ')
line2 = list(map(int, line2))
line2.sort()
for i in range(0, len(line2)):
	sys.stdout.write(str(line2[i]))
	if i + 1 < len(line2):
		sys.stdout.write(' ')


from sys import *
n = int(stdin.readline())
A = list(map(int, stdin.readline().strip().split(' ')))
A.sort()
for x in A:
	print(x, end=' ')


n = int(input())
line = [int(i) for i in input().split()]
line = sorted(line)
change = ''
for i in line:
	change = change + str(i) + ' '
print(change)


iput = int(input())
st = ''
iput_1 = list(map(int, input().split()))
iput_1.sort()
for i in iput_1:
	st += str(i) + ' '
print(st)


n = int(input())
a = list(map(int, input().split()))
a.sort()
switch = []
for i in range(n):
	switch.append(f'{a[i]}')
ans = ' '.join(switch)
print(ans)


t = int(input())
l = [int(i) for i in input().split()]
l = sorted(l)
r = [str(i) for i in l]
print(' '.join(r))


n = int(input())
s = [int(x) for x in input().split()]
p = sorted(s, reverse=False)
print(*p)


from sys import stdin

def bubblesort(lista):
	for i in range(len(lista) - 1, 0, -1):
		for j in range(i):
			if int(lista[j]) > int(lista[j + 1]):
				temp = lista[j]
				lista[j] = lista[j + 1]
				lista[j + 1] = temp
	return lista

def main():
	num_col = int(stdin.readline().strip())
	lista = stdin.readline().strip().split()
	resp = bubblesort(lista)
	print(' '.join(resp))
main()


no_of_columns = int(input())
no_per_column = input().split()
x = []
y = []
for i in range(0, no_of_columns):
	x.append(int(no_per_column[i]))
x_sorted = sorted(x)
for j in range(0, no_of_columns):
	y.append(str(x_sorted[j]))
print(' '.join(y))


def flip(a, num):
	b = [0] * num
	for n in a:
		for i in range(n):
			b[i] += 1
	return b
n = int(input(''))
col = [int(i) for i in input('').split()]
print('\n')
row = flip(col, max(col))
cols = flip(row, n)
cols.reverse()
for o in cols:
	print(o, end=' ')


column = int(input())
boxes = list(map(int, input().split()))
new_boxes = sorted(boxes)
ans = ''
for i in new_boxes:
	ans = ans + ' %d' % i
print(ans.lstrip())


__author__ = 'dougct'

def main():
	n = int(input())
	cubes = sorted(list(map(int, input().split())))
	print(' '.join(map(str, cubes)))
main()


n = int(input())
heights = list(map(int, input().split()))
newheights = []
for i in range(max(heights)):
	count = len([e for e in heights if e > 0])
	heights = [e - 1 for e in heights]
	newheights.append(count)
list = []
for i in range(n):
	list.insert(0, str(len([e for e in newheights if e > 0])))
	newheights = [e - 1 for e in newheights]
print(' '.join(list))


n_columns = int(input())
cubes = [int(i) for i in input().split(' ')]
print(' '.join((str(s) for s in sorted(cubes))))


a = input()
b = list(map(int, input().split()))
c = sorted(b)
c = [f'{i}' for i in c]
print(' '.join(c))


n = int(input())
a = [int(m) for m in input().split()]
for i in range(n - 1, 0, -1):
	for j in range(i - 1, -1, -1):
		if a[j] > a[i]:
			t = a[j] - a[i]
			a[j] -= t
			a[i] += t
print(*a)


amt = int(input())
Sequence = list(map(int, input().split()))
Sequence.sort()
NSequence = ''
for x in range(amt):
	NSequence += str(Sequence[x]) + ' '
print(NSequence)


num = int(input())
_list = input()
_list = [int(n) for n in _list.strip().split()]
_list.sort()
string = ''.join((f'{n} ' for n in _list))
print(string)


def flip():
	t = int(input())
	nums = list(map(int, input().split()))
	for i in sorted(nums):
		print(i, end=' ')
	print()
flip()


n = int(input())
columns = list(map(int, input().split()))
columns.sort()
result = ''
for col in columns:
	result = result + str(col) + ' '
print(result)


t = int(input())
l = list(map(int, input().split()))
l.sort()
ans = ''
for f in l:
	ans += str(f) + ' '
print(ans)


from sys import stdin

def main():
	a = stdin.readline()
	a = int(a)
	b = stdin.readline().split()
	for i in range(0, a):
		b[i] = int(b[i])
	b.sort()
	for i in range(0, a):
		b[i] = str(b[i])
	b = ' '.join(b)
	print(b)
main()


n = int(input())
s = input().split()
new = []
for i in range(n):
	new.append(int(s[i]))
answer = ''
while len(new) > 0:
	a = min(new)
	new.remove(a)
	string = '{} '.format(a)
	answer = answer + string
print(answer)


n = int(input())
a = input().split()
a = list(a)
number = []
for i in a:
	i = int(i)
	number.append(i)
n -= 1
number.sort(key=abs)
str1 = ''
for i in number:
	str1 += str(i)
	str1 += ' '
print(str1)


input()
li = list(map(int, input().split()))
li.sort()
for l in li:
	print(l, end=' ')


def main():
	n = int(input())
	A = sorted(map(int, input().rstrip().split()))
	print(*A)
main()


n = int(input())
values = map(int, input().split())
values = sorted(values)
for i in values:
	print(i, end=' ')


n = int(input())
b = input()
a = [int(b.split()[i]) for i in range(0, n)]
a = sorted(a)
for i in range(0, n):
	print(a[i], end=' ')


n = int(input())
T = list(map(int, input().strip().split()))
x = sorted(T)
print(' '.join((str(r) for r in x)))


size = input()
arr = list(map(int, input().split()))
for i in range(len(arr)):
	for j in range(len(arr) - 1):
		if arr[j] > arr[j + 1]:
			t = arr[j]
			arr[j] = arr[j + 1]
			arr[j + 1] = t
for i in range(len(arr)):
	print(arr[i], end=' ')


r = input
r()
print(*sorted([*map(int, r().split())]))


n = int(input())
ar1 = list(map(int, input().split()))
ar1.sort()
es = ''
for i in ar1:
	es += str(i) + ' '
print(es)


def mCheckInputs(inputList):
	n = inputList[0]
	aList = inputList[1]
	if n.isdigit() and 1 <= int(n) <= pow(10, 2):
		if len(aList) == int(n):
			pass
		else:
			exit(1)
	else:
		exit(1)

def mHandleInputs(inputList):
	try:
		n = input()
		x = list(map(int, input().split()))
		inputList.append(n)
		inputList.append(x)
		mCheckInputs(inputList)
	except ValueError as e:
		exit(1)

def mDoWork(inputList, outputList):
	aList = inputList.pop()
	result = sorted(aList)
	outputList.append(result)

def mFormatResult(outputList):
	for item in outputList[0]:
		print(item, end=' ')

def main():
	inputList = []
	mHandleInputs(inputList)
	outputList = []
	mDoWork(inputList, outputList)
	mFormatResult(outputList)
main()


user_input1 = input()
user_input2 = input()
numberArray = []
user_input2 = user_input2.split(' ')
for element in user_input2:
	numberArray.append(int(element))
numberArray.sort()
string = ''
for element in numberArray:
	string += str(element) + ' '
string = string[:-1]
print(string)


n = int(input())
line = sorted(list(map(int, input().split())))
L = str(line[0])
t = 1
while t < n:
	L = L + ' ' + str(line[t])
	t = t + 1
print(L)


n = int(input())
a = list(map(int, input().split(' ')))
a = sorted(a)
s = ''
for i in range(len(a)):
	s += str(a[i])
	if i != len(a):
		s += ' '
print(s)


import math
import os
import random
import re
import sys
m = int(input())
t = [int(x) for x in input().split()]
t.sort()
c = ''
c = ' '.join([str(elem) for elem in t])
print(c)


n = int(input())
a = sorted(list(map(int, input().split())))
s = str(a[0])
for i in range(1, len(a)):
	s += ' ' + str(a[i])
print(s)


ncols = int(input())
cols = list(map(int, input().split()))
revcols = sorted(cols)
for i in revcols:
	print(i, end=' ')


n = int(input())
line = [int(k) for k in input().split()]
line.sort()
line = [str(k) for k in line]
print(' '.join(line))


line = int(input())
numbers = [int(i) for i in input().split()]
new_list = sorted(numbers)
a = 0
if '100' in new_list:
	while True:
		if '100' not in new_list:
			break
		else:
			index1 = new_list.index('100')
			new_list.pop(index1)
			a += 1
for i in range(1, a + 1):
	new_list.append('100')
for number in new_list:
	print(number, end=' ')


n = int(input())
string = input()
list = string.split(' ')
boxes = []
for item in list:
	boxes.extend([int(item)])
boxes.sort()
for a in range(0, n):
	print(boxes[a], ' ', end='')


a = int(input())
b = [int(s) for s in input().split()]
b.sort()
print(*b)


n = int(input())
m = input()
lst = [None] * n
lst = m.split()
lst = sorted(lst, key=int)
lineout = ' '.join(lst)
print(lineout)


n = int(input())
a = [int(s) for s in input().split(' ')]
a.sort()
print(' '.join([str(j) for j in a]))


from sys import stdin

def main():
	inp = stdin
	cases = int(inp.readline().strip())
	final = sorted(list(map(int, inp.readline().strip().split())))
	final = list(map(str, final))
	print(' '.join(final))
main()


import math
import os
import sys
import re
import string
import itertools
import functools
import operator
n = int(input())
A = sorted(map(int, input().split()))
print(' '.join(map(str, A)))


import sys
index = 0
for line in sys.stdin:
	if index == 0:
		index += 1
		continue
	all_nums_str = line.split(' ')
	all_nums = []
	for word in all_nums_str:
		all_nums.append(int(word))
	all_nums.sort()
	for num in all_nums[0:len(all_nums) - 1]:
		sys.stdout.write(str(num) + ' ')
	sys.stdout.write(str(all_nums[len(all_nums) - 1]))


n = int(input())
l = list(map(int, input().split()))
l.sort()
print(str(l)[1:-1].replace(',', ''))


def Q28(lis):
	lis.sort()
	for i in range(len(lis)):
		lis[i] = str(lis[i])
	res = ' '.join(lis)
	return res
lis = []
n = int(input())
line = input().strip()
values = list(map(int, line.split()))
print(Q28(values))


import sys
lines = int(sys.stdin.readline())
line = sys.stdin.read()
lst = line.split()
lst.sort(key=int)
print(' '.join(lst))


x = int(input())
z = [int(n) for n in input().split()]
z.sort()
for n in range(x):
	print(z[n], end=' ')


i = int(input())
xx = ' '
uuu = ''
pop = input().split()
pop = list(pop)
for i in range(0, len(pop)):
	pop[i] = int(pop[i])
pop.sort()
for i in range(0, len(pop)):
	pop[i] = int(pop[i])
	z = str(pop[i])
	uuu += z + xx
print(uuu)


n = int(input())
arr = list(map(int, input().split()))
afgrav = []
a = []
for i in range(n):
	a.append(arr[i])
	p = a.pop()
	afgrav.append(p)
afgrav = sorted(afgrav)
print(*afgrav)


n = int(input())
x = list(map(int, input().split()))
x.sort(reverse=False)
for m in x:
	print(m, end=' ')


n = int(input())
lst1 = [int(item) for item in input().split()]
lst1.sort()
for x in lst1:
	print(x)


column = int(input())
cubes = input().split()
ordering = sorted(map(int, cubes))
print(' '.join(map(str, ordering)))


number_of_columns = int(input())
columns = [int(x) for x in input().split()]
changed = True
while changed == True:
	changed = False
	for i in range(number_of_columns - 1):
		if columns[i + 1] < columns[i]:
			dif = columns[i] - columns[i + 1]
			columns[i] -= dif
			columns[i + 1] += dif
			changed = True
for x in columns:
	print(x, end=' ')


x = input()
s = input()
numbers = list(map(int, s.split()))
numbers.sort()
print(*numbers, sep=' ')


a = []
x = input()
rows = [input()]
z = rows[0].split()
for i in range(len(z)):
	a.append(int(z[i]))
a.sort()
st = ''
for i in range(len(z)):
	st = st + str(a[i]) + ' '
print(st)


def main():
	n = int(input())
	columns = [int(x) for x in input().split()]
	done = False
	while not done:
		done = True
		for i in range(n - 1):
			if columns[i] > columns[i + 1]:
				done = False
				x = columns[i] - columns[i + 1]
				columns[i] -= x
				columns[i + 1] += x
	print(' '.join(map(str, columns)))
main()


n = int(input())
li = list(map(int, input().split()))
li.sort()
print(' '.join(map(str, li)))


from sys import stdin

def partition(lista):
	(pivote, menores, mayores) = (lista[0], [], [])
	for x in range(1, len(lista)):
		if lista[x] < pivote:
			menores.append(lista[x])
		else:
			mayores.append(lista[x])
	return (menores, [pivote], mayores)

def quicksort(lista):
	if len(lista) < 2:
		return lista
	(menores, medio, mayores) = partition(lista)
	return quicksort(menores) + medio + quicksort(mayores)

def main():
	n = int(stdin.readline())
	m = [int(arr_temp) for arr_temp in stdin.readline().strip().split()]
	m = quicksort(m)
	s = ''
	for i in m:
		s = s + str(i) + ' '
	print(s)
main()


n = int(input())
del n
arr = list(map(int, input().split()))
arr.sort()
print(' '.join((str(j) for j in arr)))


def mergeSort(alist):
	if len(alist) > 1:
		mid = len(alist) // 2
		lefthalf = alist[:mid]
		righthalf = alist[mid:]
		mergeSort(lefthalf)
		mergeSort(righthalf)
		i = 0
		j = 0
		k = 0
		while i < len(lefthalf) and j < len(righthalf):
			if lefthalf[i] < righthalf[j]:
				alist[k] = lefthalf[i]
				i = i + 1
			else:
				alist[k] = righthalf[j]
				j = j + 1
			k = k + 1
		while i < len(lefthalf):
			alist[k] = lefthalf[i]
			i = i + 1
			k = k + 1
		while j < len(righthalf):
			alist[k] = righthalf[j]
			j = j + 1
			k = k + 1
n = int(input())
numbers = input().split()
for i in range(len(numbers)):
	numbers[i] = int(numbers[i])
mergeSort(numbers)
for i in range(len(numbers)):
	print(numbers[i], end=' ')


n = int(input())
s = list(map(int, input().split()))
for i in range(1, n):
	if s[i] < s[i - 1]:
		for j in range(i):
			k = i - j
			if s[k] < s[k - 1]:
				z = s[k - 1] - s[k]
				s[k] += z
				s[k - 1] -= z
for i in s:
	print(i, end=' ')


n = int(input())
a = [int(x) for x in input().split()]
b = [0] * n
for i in range(max(a)):
	ct = 0
	for j in range(n):
		if a[j] >= i + 1:
			ct += 1
			b[-ct] += 1
print(' '.join([str(c) for c in b]))


n = int(input())
a = [int(i) for i in input().split()]
arr = [0 for _ in range(max(a))]
for i in range(max(a)):
	for e in a:
		if e > i:
			arr[i] += 1
ans = [0 for _ in range(n)]
for i in range(n):
	for e in arr:
		if e > i:
			ans[i] += 1
print(' '.join(reversed([str(e) for e in ans])))


def main():
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	ans = ''
	for c in a:
		ans += str(c) + ' '
	print(ans)
main()


varc = int(input())
vars = str(input())
vars = vars.split()
new_lis = []
for i in range(len(vars)):
	new_lis.append(int(vars[i]))
new_lis.sort()
test = ''
for i in new_lis:
	test += str(i)
	test += ' '
print(test)


input()
ar = list(map(int, input().split()))
ar.sort()
print(' '.join(map(str, ar)))


def main():
	from sys import stdin, stdout
	stdin.readline()
	t = tuple(map(int, stdin.readline().split()))
	for i in sorted(t):
		stdout.write(str(i) + ' ')
main()


import sys

def ans(arr):
	arr.sort()
	if len(arr) is 0:
		print()
	if len(arr) is 1:
		print(arr[0])
	else:
		for i in range(len(arr) - 1):
			print(arr[i], end=' ')
		print(arr[len(arr) - 1])
	pass
n = int(input())
arr = list(map(int, input().strip().split(' ')))
ans(arr)


from sys import stdin, stdout

def main():
	columns = stdin.readline()
	arr = [int(x) for x in stdin.readline().split()]
	rows = max(arr)
	rowBlocks = [0] * rows
	for x in range(len(arr)):
		while arr[x] > 0:
			rowBlocks[arr[x] - 1] += 1
			arr[x] -= 1
	newColumns = [0] * int(columns)
	newCols = int(columns)
	while newCols != 0:
		for i in range(len(rowBlocks)):
			if rowBlocks[i] > 0:
				newColumns[newCols - 1] += 1
				rowBlocks[i] -= 1
		newCols -= 1
	for x in newColumns:
		print(x, end=' ')
main()


n = int(input())
S = list(map(int, input().split()))
S.sort()
print(*S)


a = int(input())
s = ' '
l = list(map(int, input().split()))
ll = sorted(l)
for i in range(len(ll)):
	if i == len(ll) - 1:
		s += str(ll[i])
	else:
		s += str(ll[i])
		s += ' '
print(s)


c = int(input())
cube = input().split()
int_cube = sorted([int(item) for item in cube])
for item in int_cube:
	print(item)


n = int(input())
kek = map(int, input().split())
a = []
for i in kek:
	a.append(i)
a = sorted(a)
for i in a:
	print(i, end=' ')


x = int(input())
y = [int(u) for u in input().split()]
arr = sorted(y)
s = ''
for i in arr:
	s += '{} '.format(i)
print(s)


from sys import stdin

def main():
	y = int(stdin.readline())
	lista = [int(x) for x in stdin.readline().split()]
	if y == 1:
		print(lista[0])
	else:
		rang = 1
		cont = 0
		lista = order_r(lista, rang, cont)
		for i in lista:
			print(i, end=' ')

def order_r(lista, rang, cont):
	i = 0
	lista = after(lista, cont + 1, i)
	if rang < len(lista) - 1:
		cont += 1
		return order_r(lista, rang + 1, cont)
	else:
		return lista

def after(lista, cont, i):
	if lista[cont] < lista[i]:
		cache = lista[i]
		lista[i] = lista[cont]
		lista[cont] = cache
	if i < cont:
		return after(lista, cont, i + 1)
	else:
		return lista
main()


n = int(input(''))
list1 = list(map(int, input().split()))
list1.sort()
print(*list1)


n = int(input())
m = list(map(int, input().split()))
print(*sorted(m))


arg = int(input())
for a in range(0, 1):
	l1 = list(map(int, input().strip().split()))
l1.sort()
print(' '.join((str(x) for x in l1)))


n = int(input())
a = sorted([int(f) for f in input().split()])
print(*a)


n = int(input())
x = list(map(int, input().split()))
cmp = n - 1
pos = 0
while pos < n:
	v = x[pos] - x[cmp]
	if v > 0:
		x[pos] -= v
		x[cmp] += v
	elif pos == cmp:
		cmp = n
		pos += 1
	cmp -= 1
print(' '.join(map(str, x)))


n = int(input())
s = input().split(' ')
block = []
for i in s:
	block.append(int(i))
for i in range(n):
	mi = i
	for j in range(i + 1, n):
		if block[j] < block[mi]:
			mi = j
	t = block[mi]
	block[mi] = block[i]
	block[i] = t
for i in block:
	print(i, end=' ')


n = int(input())
t = input().split()
s = []
for i in range(len(t)):
	s.append(int(t[i]))
for i in range(len(s) - 1):
	for j in range(len(s) - 1 - i):
		if s[j] > s[j + 1]:
			(s[j], s[j + 1]) = (s[j + 1], s[j])
for i in range(len(s)):
	print(s[i], end=' ')


def gravity_cubes(lista):
	lista.sort()
	return lista
inp1 = int(input())
lista = list(map(int, input().rstrip().split()))
result = gravity_cubes(lista)
print(' '.join((str(x) for x in result)))


a = int(input())
b = input()
c = b.split()
c.sort(key=float)
print(' '.join(c))


n = int(input())
lst = [int(i) for i in input().split()]
output_lst = 100 * [0]
for i in range(n):
	for j in range(lst[i]):
		output_lst[j] += 1
output = []
for i in range(n):
	total = 0
	for j in output_lst:
		if j >= n - i:
			total += 1
	output.append(str(total))
print(' '.join(output))


n = int(input())
spaces = [int(x) for x in input().split()]
spaces.sort()
spaces_to_str = map(str, spaces)
print(' '.join(spaces_to_str))


columns = input()
values = map(str, sorted(list(map(int, input().split()))))
print(' '.join(values))


n = int(input())
arr = [int(i) for i in input().split()]
store = {}
for i in range(n):
	try:
		store[arr[i]] += 1
	except:
		store[arr[i]] = 1
result = []
for j in range(101):
	try:
		result = result + [j] * store[j]
	except:
		pass
print(*result)


n = int(input())
r = list(map(int, input().split()))
r.sort()
for i in range(len(r) - 1):
	print(r[i], end=' ')
print(r[len(r) - 1])


n = int(input())
arr = [int(i) for i in input().split()]
for i in range(n - 1):
	for j in range(n - 1, i, -1):
		diff = arr[i] - arr[j]
		if diff > 0:
			arr[j] += diff
			arr[i] -= diff
print(*arr)


from time import sleep

def check_answer(input_list):
	list_length = len(input_list)
	for i in range(list_length):
		if i != list_length - 1:
			if input_list[i] > input_list[i + 1]:
				return False
	return True
n = int(input())
input_string = input().split(' ')
cube_list = []
for i in range(n):
	cube_list.append(int(input_string[i]))
while check_answer(cube_list) == False:
	for i in range(n):
		if i != n - 1:
			if cube_list[i] > cube_list[i + 1]:
				temp = cube_list[i] - cube_list[i + 1]
				cube_list[i + 1] += temp
				cube_list[i] -= temp
for i in range(n):
	print(cube_list[i], end=' ')


n = int(input())
cubes = [int(a) for a in input().split()]
print(' '.join([str(a) for a in sorted(cubes)]))


n = int(input())
l = list(map(int, input().split()))
for i in range(n - 1, -1, -1):
	if i + 1 < n and l[i] > l[i + 1]:
		t = l[i] - l[i + 1]
	else:
		t = 0
	z = t
	for j in range(i + 1, n):
		if t <= 0:
			break
		if l[i] <= l[j]:
			l[j - 1] += t
			t = 0
		elif l[i] - l[j] < t:
			l[j - 1] += t - (l[i] - l[j])
			t = l[i] - l[j]
	if t > 0:
		l[-1] += t
	l[i] = l[i] - z
print(*l)


def func():
	n = int(input())
	ar = [int(x) for x in input().split(' ')]
	ar.sort()
	for i in ar:
		print(i, end=' ')
func()


n = int(input())
a = [int(x) for x in input().split()]
while True:
	for i in range(n - 1, 0, -1):
		if a[i] < a[i - 1]:
			x = a[i - 1] - a[i]
			a[i] = a[i] + x
			a[i - 1] = a[i - 1] - x
	y = 0
	for i in range(n - 1, 0, -1):
		if a[i] >= a[i - 1]:
			y += 1
	if y == n - 1:
		break
print(*a, sep=' ')


qtd = int(input())
box = map(int, input().split())
print(*sorted(box))


def insertSort(l):
	for j in range(0, len(l)):
		for i in range(0, len(l) - 1):
			if l[i] > l[i + 1]:
				temp = l[i + 1]
				l[i + 1] = l[i]
				l[i] = temp
	return l
length = int(input())
l = list(map(int, input().split()))
newl = insertSort(l)
print(*newl, sep=' ')


n = int(input())
a = input()
a = [int(x) for x in a.split()]
ref = sorted(a)
if a == ref:
	a = [str(x) for x in a]
	print(' '.join(a))
else:
	a = a[::-1]
	blo = 1
	while blo < n:
		left = a[0]
		if a[blo] > a[blo - 1]:
			if a[blo] <= left:
				move = a[blo] - a[blo - 1]
				a[blo - 1] += move
				a[blo] -= move
				blo = 1
			else:
				dif_l = a[blo] - left
				move = a[blo] - a[blo - 1]
				a[0] += dif_l
				a[blo - 1] += move - dif_l
				a[blo] -= move
				blo = 1
		else:
			blo += 1
	a = [str(x) for x in a[::-1]]
	print(' '.join(a))


n = int(input(''))
l = list(map(int, input().split(' ')))

def ordenada(l):
	for k in range(len(l) - 1):
		if l[k + 1] < l[k]:
			return False
	return True

def printear(l):
	str1 = ''
	for k in range(len(l) - 1):
		str1 += str(l[k]) + ' '
	return str1 + str(l[len(l) - 1])
while ordenada(l) != True:
	k = 0
	while k < n - 1:
		if l[k] > l[k + 1]:
			ax = l[k]
			l[k] = l[k + 1]
			l[k + 1] = ax
		k += 1
print(printear(l))


n = int(input())
ip = input().split()
ip = [int(i) for i in ip]
ip.sort()
for i in ip:
	print(i, end=' ')


n = int(input())
line = [int(i) for i in input().split()]
m = max(line)
ans = [0 for i in range(n)]
for i in range(m, 0, -1):
	count = 0
	for t in line:
		if t >= i:
			count += 1
	for j in range(n - 1, n - 1 - count, -1):
		ans[j] += 1
for i in ans:
	print('%d ' % i, end='')


n = int(input())
a = list(map(int, input().split(' ')))
for i in range(0, n):
	for j in range(0, n - 1):
		if a[j] > a[j + 1]:
			m = a[j]
			a[j] = a[j + 1]
			a[j + 1] = m
for k in range(n):
	print(a[k], end=' ')


N = int(input())
l = [int(i) for i in input().split()]
l.sort()
for i in l:
	print(i, end=' ')


import sys
inputs = [line.strip() for line in sys.stdin]
outs = sorted(map(int, inputs[1].split(' ')))
print('%s' % ' '.join(map(str, outs)))


import sys
BEI_FILE = 'GF_input'
BEO_FILE = 'GF_output'
EXT_FILE = ['_0.txt', '_1.txt']

def my_sort(input_file):
	n = int(input_file.readline())
	a = [int(x) for x in input_file.readline().split()]
	a.sort()
	for val in a:
		print(val)
my_sort(sys.stdin)


import string
n = int(input())
a = [int(i) for i in input().split()]
a.sort()
for i in a:
	print(i, end=' ')


import math
st = ''

def func(l1):
	l1.sort()
	print(*l1)
for _ in range(1):
	n = int(input())
	l1 = list(map(int, input().split()))
	func(l1)


n = int(input())
a = input()
b = a.split()
c = []
for i in range(len(b)):
	c.append(int(b[i]))
a = sorted(c)
for items in a:
	print(items, end=' ')


n = int(input())
a = [int(i) for i in input().split()]
a.sort()
b = [str(j) for j in a]
print(' '.join(b))


import sys
num_things = sys.stdin.readline()
line = sys.stdin.readline()
l = list()
nums = line.split(' ')
for n in nums:
	l.append(int(n))
l.sort()
for num in l:
	print(num, end=' ')


ONLINE_JUDGE = True
ONLINE_JUDGE = False
if not ONLINE_JUDGE:
	try:
		import sys
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	except BaseException:
		pass
n = int(input())
kubics = sorted(map(int, input().split()))
print(*kubics)


n = int(input())
t = 0
l = [int(x) for x in input().split()]
for i in range(n - 1, -1, -1):
	for j in range(i - 1, -1, -1):
		if l[i] < l[j]:
			t = l[i]
			l[i] = l[i] + (l[j] - l[i])
			l[j] = l[j] - (l[j] - t)
for i in range(0, n):
	if i != n - 1:
		print(l[i], end=' ')
	else:
		print(l[i])


def inp():
	return int(input())

def inlt():
	return input().split()

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def gravity_flip(columns):
	return ' '.join(sorted(columns, key=lambda x: int(x)))
num_columns = inp()
columns = inlt()
print(gravity_flip(columns))


n = input()
del n
b = [int(i) for i in input().split()]
b.sort()
print(*b)


qtd_cols = int(input())
boxes = list(map(int, input().split()))
for i in range(qtd_cols):
	min_index = i
	for j in range(i + 1, qtd_cols):
		if boxes[min_index] > boxes[j]:
			min_index = j
	aux = boxes[i]
	boxes[i] = boxes[min_index]
	boxes[min_index] = aux
for i in range(qtd_cols):
	print(boxes[i], end=' ')
print()


def main():
	columns = input()
	Cubes = input().split()
	Cubes = list(map(int, Cubes))
	columns = int(columns)
	Cubes.sort()
	Cubes = ' '.join(list(map(str, Cubes)))
	print(Cubes)
main()


N = int(input())
line = [int(k) for k in input().split(' ')]
line = sorted(line)
list1 = []
for k in line:
	list1.append(str(k))
print(' '.join(list1))


q = input()
m = [int(j) for j in input().split()]
print(' '.join((str(j) for j in sorted(m))))


n = int(input())
m = [int(i) for i in input().split()]
k = sorted(m)
for i in range(len(k)):
	print(str(k[i]), end=' ')


n = int(input())
M = input().split()
for i in range(n):
	M[i] = int(M[i])
M.sort()
for i in M:
	print(i, end=' ')


n = input()
temp = input().split()
a = []
for i in range(int(n)):
	a.append(int(temp[i]))
a = sorted(a)
for i in a:
	print(i, end=' ')


def meu_map(lista):
	for i in range(len(lista)):
		lista[i] = int(lista[i])

def ordena(lista):
	for i in range(len(lista) - 1):
		for j in range(len(lista) - 1):
			if lista[j] > lista[j + 1]:
				(lista[j], lista[j + 1]) = (lista[j + 1], lista[j])

def trata_lista(lista):
	seq = ''
	primeiro = True
	for e in lista:
		if primeiro:
			seq += str(e)
			primeiro = False
		else:
			seq += ' ' + str(e)
	return seq
colunas = int(input())
cubos = input().split()
meu_map(cubos)
ordena(cubos)
print(trata_lista(cubos))


n = int(input())
A = input().split()
an = len(A)
ann = []
for i in range(an):
	ann.append(int(A[i]))
ann.sort()
word = ''
for i in range(an):
	word = word + str(ann[i]) + ' '
print(word)


n = int(input())
arr = list(map(int, input().split()))
arr.sort()
arr = [str(k) for k in arr]
print(' '.join(arr))


from sys import stdin
casos = int(stdin.readline().strip())
while casos != '':
	entrada = list(map(int, stdin.readline().strip().split(' ')))
	entrada.sort()
	entrada = list(map(str, entrada))
	print(' '.join(entrada))
	casos = stdin.readline().strip()


x = int(input())

def intmaker(arr):
	for i in range(len(arr)):
		arr[i] = int(arr[i])
	return arr
og_blocks = intmaker(input().split())
is_sorted = False
while not is_sorted:
	is_sorted = True
	for i in range(x - 1):
		if og_blocks[i] > og_blocks[i + 1]:
			diff = og_blocks[i] - og_blocks[i + 1]
			og_blocks[i] -= diff
			og_blocks[i + 1] += diff
			is_sorted = False
for num in og_blocks:
	print(num, end=' ')


h = int(input())
l = list(map(int, input().split()))
for i in range(1, h):
	k = max(l[:-i])
	if k > l[-i]:
		(l[-i], l[l.index(k)]) = (l[l.index(k)], l[-i])
print(*l)


n = int(input())
lst = list(map(int, input().split()))[:n]
lst.sort()
s = ''
for i in range(len(lst)):
	s = s + str(lst[i])
	s = s + ' '
print(s)


n = int(input())
numeros = input().split()
lista = []
for i in numeros:
	lista.append(int(i))
lista.sort()
string = ''
for i in lista:
	string += str(i) + ' '
print(string.strip())


bot = True
input()
print(*sorted(map(int, input().split())))


hari = int(input())
arr = list(map(int, input().split()))
ar1 = sorted(arr)
print(*ar1)


n = int(input())
mas = list(map(int, input().split()))
print(*sorted(mas))


n = int(input())
A = list(map(int, input().split()))
print(*sorted(A))


from sys import stdin

def quicksort(liston):
	if len(liston) < 2:
		return liston
	else:
		(menores, medio, mayores) = dividir(liston)
		return quicksort(menores) + medio + quicksort(mayores)

def dividir(liston):
	(pivote, menores, mayores) = (liston[0], [], [])
	for x in range(1, len(liston)):
		if liston[x] < pivote:
			menores.append(liston[x])
		else:
			mayores.append(liston[x])
	return (menores, [pivote], mayores)

def main():
	num = int(stdin.readline())
	liston = [int(x) for x in stdin.readline().strip().split(' ')]
	p = quicksort(liston)
	lo = ''
	for x in p:
		lo = lo + str(x) + ' '
	print(lo)
main()


n = int(input())
a = [i for i in input().split()]
a = list(map(int, a))
a.reverse()
for i in range(0, len(a)):
	k = int(a[i])
	for j in range(i, len(a)):
		if a[j] > k:
			k = a[j]
	for j in range(i, len(a)):
		if a[j] == k:
			if a[i] < a[j]:
				temp = a[j]
				a[j] = a[i]
				a[i] = temp
			break
a.reverse()
for i in range(0, len(a)):
	print(a[i], end=' ')


n = int(input())
cols = [int(x) for x in input().split()]
cols.sort()
print(str(cols).replace(',', '')[1:-1])


n = int(input())
if n > 0:
	cols = [int(x) for x in input().split(' ')]
	cols = sorted(cols)
	print(cols[0])
	for i in range(1, n):
		print(' ' + str(cols[i]))


n = int(input())
l = list(map(int, input().split()))
l.sort()
for i in range(len(l)):
	l[i] = str(l[i])
k = ' '.join(l)
print(k)


w = int(input())
(v, mm, x) = ('', 0, 0)
s = input().split()
for f in range(w):
	s[f] = int(s[f])
s.sort()
for f in s:
	v += str(f)
	v += ' '
print(v)


n = int(input())
p = [int(x) for x in input().split()]
p.sort()
for i in p:
	print(i, end=' ')


from sys import stdin
inp = map(lambda s: s.strip(), stdin.readlines())
inp = list(inp)[1].split()
print(' '.join(sorted(inp, key=int)))


count_prob = int(input())
lst = [int(a) for a in input().split()]
max_lst = max(lst)
blocks = []
for each_ele in lst:
	blocks.append(each_ele * ['1'] + (max_lst - each_ele) * ['0'])
total_shift = 0
final_str = ''
for block in range(count_prob - 1, -1, -1):
	for each_ele_idx in range(0, max_lst):
		if blocks[block][each_ele_idx] == '0':
			for ele in range(block - 1, -1, -1):
				if blocks[ele][each_ele_idx] == '1':
					temp = blocks[ele][each_ele_idx]
					blocks[ele][each_ele_idx] = blocks[block][each_ele_idx]
					blocks[block][each_ele_idx] = temp
					break
	count = 0
	for n in blocks[block]:
		if n == '1':
			count += 1
	final_str = str(count) + ' ' + final_str
print(final_str)


n = int(input())
l = []
a = input().split()
for i in range(n):
	l.append(int(a[i]))
l1 = sorted(l)
for i in range(n):
	l1[i] = str(l1[i])
print(' '.join(l1))


n = int(input())
A = list(map(int, input().split(' ')))
A.sort()
s = ''
for i in A:
	s += str(i)
	s += ' '
print(s)


num_columns = int(input())
list_of_inputs = [int(x) for x in input().split()]
list_of_inputs.sort()
print(*list_of_inputs)


n = int(input())
s = str(input()).split()
u = [int(ss) for ss in s]
u.sort()
for uu in u:
	print(uu, sep='', end=' ')
print()


n = int(input())
x = list(map(int, input().split()))
A = [[0 for i in range(n)] for i in range(max(x))]
for i in range(n):
	for j in range(max(x)):
		if x[i] > j:
			A[j][i] = 1
y = [0 for i in range(max(x))]
for i in range(max(x)):
	for j in range(n):
		y[i] += A[i][j]
for i in range(n):
	for j in range(max(x)):
		if y[j] > n - i - 1:
			A[j][i] = 1
		else:
			A[j][i] = 0
z = [0 for i in range(n)]
for i in range(n):
	for j in range(max(x)):
		z[i] += A[j][i]
	z[i] = str(z[i])
print(' '.join(z))


input()
vals = input().split()
vals = [int(val) for val in vals]
vals.sort()
vals = [str(val) for val in vals]
print(' '.join(vals))


import sys
ip = int(input())
line = sys.stdin.readline()
_temp = line.strip()
temp = _temp.split(' ')
l = len(temp)
for x in range(l):
	temp[x] = int(temp[x])
for i in range(l):
	for j in range(0, l - i - 1):
		if temp[j] > temp[j + 1]:
			(temp[j], temp[j + 1]) = (temp[j + 1], temp[j])
for k in range(len(temp)):
	print(temp[k], end=' ')
print()


n = int(input())
L = list(map(int, input().split()))
L.sort()
for item in L:
	print(item, end=' ')


from math import ceil
import sys, bisect, copyreg, copy, statistics, os

def inp():
	return sys.stdin.readline().strip()

def IIX():
	return (int(x) for x in sys.stdin.readline().split())

def II():
	return int(inp())

def LI():
	return list(map(int, inp().split()))

def LS():
	return list(map(str, inp().split()))

def L(x):
	return list(x)

def out(var):
	return sys.stdout.write(str(var))
n = II()
positions = LI()
positions.sort()
newPos = []
for i in positions:
	newPos.append(str(i))
out(' '.join(newPos))


n = int(input())
aline = input().split(' ')
a = [int(i) for i in aline]
for j in range(n - 1):
	for i in range(n - 1):
		if a[i] > a[i + 1]:
			k = a[i]
			a[i] = a[i + 1]
			a[i + 1] = k
output = ''
for i in a[:-1]:
	output += str(i) + ' '
output += str(a[-1])
print(output)


input()
s = [int(i) for i in input().split()]
s.sort()
print(' '.join((str(i) for i in s)))


n = int(input().strip())
cubes = list(map(int, input().strip().split()))
print(' '.join([str(x) for x in sorted(cubes)]))


n = int(input())
s = 0
c = []
for a in input().split():
	c.append(int(a))
c.sort()
for i in c:
	print(i, end=' ')


input()
lst = list(map(int, input().split()))
lst.sort()
for value in lst:
	print(value, end=' ')


from sys import stdin
size = stdin.readline()
l = stdin.readline().split()
for i in sorted(l, key=int):
	print(i, end=' ')


n = int(input())
arr = [int(x) for x in input().split()]
sorted_arr = sorted(arr)
for x in sorted_arr:
	print('%d ' % x, end='')


x = input()
inp = list(map(int, input().split()))
inp.sort()
for v in inp:
	print(v)


n = int(input())
m = list(map(int, input().split()))
m.sort()
s = ''
for i in m:
	s += str(i) + ' '
print(s[:-1])


n = int(input())
x = input()
a = x.split()
for t in range(0, len(a)):
	a[t] = int(a[t])
if len(a) == 1:
	print(a[0])
	exit()
else:
	j = 0
	while j < 200:
		for i in range(0, len(a) - 1):
			if a[i] > a[i + 1]:
				k = a[i] - a[i + 1]
				a[i] = a[i] - k
				a[i + 1] = a[i + 1] + k
		j = j + 1
b = []
for u in range(0, len(a)):
	b.append(str(a[u]))
	if u == len(a) - 1:
		break
	b.append(' ')
c = ''
d = c.join(b)
print(d)


n = int(input())
arr = input().split()
arr = [int(i) for i in arr]
arr = sorted(arr)
print(' '.join([str(s) for s in arr]))


n = int(input())
l = [int(x) for x in input().split()]
l.sort()
print(*l, sep=' ')


import fileinput
import sys

def main():
	i = int(input(''))
	x = input('')
	x = x.split(' ')
	x = sorted(x, key=lambda e: int(e))
	for n in x:
		print(n, end=' ')
main()


num = int(input())
lista_n = [int(n) for n in input().split(' ')]
lista_n.sort()
for v in lista_n:
	print(f'{v} ', end='')


from sys import stdin

def test_case(a):
	s = sorted(a)
	for v in s:
		print(v, end=' ')
	print()

def main():
	for _ in stdin:
		a = [int(v) for v in input().split()]
		test_case(a)
main()


y = int(input())
lista_col = [int(i) for i in input().split()]
lista_col.sort()
for i in range(len(lista_col) - 1):
	print('{} '.format(lista_col[i]), end='')
print(lista_col[-1])


col = input()
cubes = input().split()
cubes = [int(x) for x in cubes]
output = sorted(cubes)
print(' '.join((str(s) for s in output)))


def selec(a, n):
	for i in range(n - 1, 0, -1):
		tmp = i
		for j in range(i - 1, -1, -1):
			if a[tmp] <= a[j]:
				tmp = j
		tempEle = a[i]
		a[i] = a[tmp]
		a[tmp] = tempEle
n = int(input())
a = list(map(int, input().strip().split()))
selec(a, n)
for i in a:
	print(i, end=' ')


n = int(input())
first = list(map(int, input().split()))
first.sort()
print(' '.join(list(map(str, first))))


def ii():
	return int(input())

def mi():
	return map(int, input().split())

def si():
	return [int(x) for x in input().split()]

def ss():
	return [x for x in input()]
a = ii()
print(*sorted(si()))


columns = int(input())
size_columns = list(map(int, input().split()))
size_columns.sort()
result = ''
for value in size_columns:
	result += str(value) + ' '
print(result.strip())


n = int(input())
a = list(map(int, input().split(' ')))
d = a
d.sort()
while a != d:
	for i in range(0, n - 1):
		b = a[i + 1]
		c = a[i]
		if a[i] > a[i + 1]:
			a[i + 1] = c
			a[i] = b
		d = a
		d.sort()
print(*a, sep=' ')


value = input()
values = input()
values = values.split()
values = [int(i) for i in values]
values.sort()
for i in values:
	print(i, end=' ')


colums = input()
c_values = [int(i) for i in input().split()]
c_values.sort()
print(*c_values)


from sys import stdin

def order():
	n = int(stdin.readline())
	lista = [int(x) for x in stdin.readline().split()]
	lis_a = 1
	for i in range(len(lista)):
		for j in range(lis_a):
			if lista[i] < lista[j]:
				cache = lista[j]
				lista[j] = lista[i]
				lista[i] = cache
		lis_a += 1
	for i in lista:
		print(i, end=' ')
order()


firstline = input()
secondline = input()
stringarray = secondline.split(' ')
numbers = []
for number in stringarray:
	numbers.append(int(number))
numbers.sort()
answer = ''
for number in numbers:
	answer = answer + str(number) + ' '
print(answer)


n = int(input())
col = [int(i) for i in input().split()]
col.sort()
print(' '.join([str(i) for i in col]))


n = int(input())
height = [int(x) for x in input().split()]
print(' '.join([str(x) for x in sorted(height)]))


n = int(input())
a = list(map(int, input().split()))
b = sorted(a)
print(*b, end=' ')


a = int(input())
s = input().split()
s1 = list(s)
for i in range(len(s1)):
	s1[i] = int(s1[i])
s1 = sorted(s1)
for item in s1:
	print(item, end=' ')


n = int(input())
arr = [int(ele) for ele in input().split()]
arr = sorted(arr)
print(*arr)


n = int(input())
data = sorted([int(x) for x in input().split()])
for i in range(len(data)):
	print(data[i], end=' ' if i < len(data) - 1 else '\n')


from sys import stdin
N = int(stdin.readline())
cols = list(map(int, stdin.readline().strip().split(' ')))
print(' '.join(map(str, sorted(cols))))


x = input()
x = [int(y) for y in input().split()]
x.sort()
z = ''
for i in x:
	z += str(i) + ' '
print(z[:-1])


n = input()
ans = [int(x) for x in input().split()]
ans.sort()
print(*ans)


n = input()
col = list(map(int, input().split()))
col.sort()
outpt = []
for i in range(0, len(col)):
	print(col[i], end=' ')


n = int(input())
h = [int(x) for x in input().split()]
maxh = 0
for i in range(n):
	maxh = max(maxh, h[i])
cnt = [0] * (maxh + 1)
for i in range(n):
	cnt[h[i]] += 1
for i in range(maxh + 1):
	for j in range(cnt[i]):
		print(i, end=' ')


n = int(input())
lis = list(map(int, input().split()))
for i in range(len(lis)):
	for j in range(len(lis) - 1):
		if lis[j] > lis[j + 1]:
			t = lis[j]
			lis[j] = lis[j + 1]
			lis[j + 1] = t
print(*lis)


n = int(input())
d = [int(x) for x in input().split()]
print(*sorted(d))


a = int(input())
arr = list(map(int, input().rstrip().split()))
arr.sort()
for i in arr:
	print(i, end=' ')


n = int(input())
lis = list(map(int, input().split()))
lis.sort()
print(*lis)


n = int(input())
A = list(map(int, input().split()))
B = []
for i in range(1, max(A) + 1):
	k = 0
	for j in range(n):
		if A[j] >= i:
			k += 1
	B.append(k)
for i in range(n):
	k = 0
	for j in range(len(B)):
		if B[j] >= n - i:
			k += 1
	A[i] = k
print(' '.join(list(map(str, A))))


columns = int(input())
cubes = list(map(int, input().split()))
cubes.sort()
print(' '.join(map(str, cubes)))


n = int(input())
box = list(map(int, input().split()))
box.sort()
print(' '.join(map(str, box)))


import sys
inputs = sys.stdin.read().split()
numCols = int(inputs[0])
cubes = []
for cube in inputs[1:]:
	cubes.append(int(cube))
cubes = sorted(cubes)
for idx in range(len(cubes) - 1):
	print(cubes[idx], end=' ')
print(cubes[-1])


n = int(input())
a = [int(x) for x in input().split()]
b = sorted(a)
for e in b:
	print(e, end=' ')


n = int(input())
line2 = [int(i) for i in input().split()]
line3 = sorted(line2)
line4 = [str(i) for i in line3]
print(' '.join(line4))


n = int(input())
i = 0
A = []
a = input().split()
while i < n:
	A.append(int(a[i]))
	i += 1
A.sort()
i = 0
while i < n:
	if i < n - 1:
		print(A[i], end=' ')
	else:
		print(A[i])
	i += 1


import sys
num = 0
cols = []
for a in sys.stdin:
	if num == 0:
		num = int(a)
	else:
		cols = a.split(' ')
for a in range(num):
	cols[a] = int(cols[a])
cols.sort()
for a in range(num):
	print(cols[a], end=' ')


n = int(input())
cols = [int(j) for j in input().split()]
cols.sort()
strcols = ''.join((str(e) + ' ' for e in cols))
print(strcols)


a = int(input())
l = sorted(list(map(int, input().split())))
for i in range(a):
	print(l[i], end=' ')


n = int(input())
l = []
m = input().split()
for i in range(n):
	l.append(int(m[i]))
l0 = sorted(l)
ls = []
for i in range(n):
	ls.append(str(l0[i]))
f = ' '.join(ls)
print(f)


n = int(input(''))
m = input('')
lst = []
l = m.split()
for k in l:
	k = int(k)
	lst.append(k)
lst.sort()
for i in lst:
	print(i)


n = int(input())
tab = [int(x) for x in input().split()]
tab.sort()
for y in tab:
	print(y)


n = int(input())
box = [int(i) for i in input().split()]
box.sort()
for j in range(n):
	if j != n - 1:
		print(box[j], end=' ')
	else:
		print(box[j])


n = int(input())
array = list(map(int, input().split()))
array1 = [0] * n
for i in range(1, max(array) + 1):
	k = len([m for m in array if m >= i])
	for j in range(0, k):
		array1[-1 - j] += 1
print(*array1)


from sys import stdin

def main():
	x = int(stdin.readline().strip())
	line = [int(x) for x in stdin.readline().strip().split()]
	line.sort()
	for i in range(x):
		print(line[i], end=' ')
main()


x = input().split()
x = int(x[0])
l = list(map(int, input().split()))
l.sort()
for i in l:
	print(i, end=' ')


c = int(input())
col = input().split()
col = list(map(int, col))
col = sorted(col)
for i in range(len(col)):
	print(col[i], end=' ')


m = input()
l = list(map(int, input().split()))
l = list(map(str, sorted(l)))
print(' '.join(l))


n = int(input())
z = list(input().split())
ne = [int(i) for i in z]
ne.sort()
for i in range(len(ne)):
	print(ne[i], end=' ')


n = int(input())
x = list(map(int, input().split()))
x.sort()
print(' '.join(map(str, x)))


n = int(input())
raw = [int(x) for x in input().split(' ')]
raw.sort()
prt = ''
for i in raw:
	prt += str(i) + ' '
print(prt)


no_of_columns = input()
inp = input()
if no_of_columns == '0':
	exit()
if len(inp) == 1:
	print(inp)
	exit()
the_list = inp.split()
the_list = [int(i) for i in the_list]
the_list.sort()
res = ''
for i in the_list:
	res += str(i) + ' '
print(res)


n = int(input())
a = [int(i) for i in input().split()]
d = [0] * max(a)
for i in a:
	for j in range(i):
		d[j] += 1
res = [0] * max(d)
for i in d:
	for j in range(i):
		res[j] += 1
res.reverse()
print(' '.join([str(i) for i in res]))


n = int(input())
num1 = list(map(int, input().split()))
num2 = sorted(num1, reverse=False)
print(' '.join((str(x) for x in num2)))


n = int(input())
a = list(map(int, input().split()))
x = min(a)
g = [x for _ in range(n)]
a.sort()
print(*a)


col = int(input())
nums = list(map(int, input().split()))
nums.sort()
out = ''
for i in range(col):
	out = out + ' ' + str(nums[i])
print(out[1:])


n = int(input())
input_list = list(map(int, input().split()))
input_list.sort()
input_list = list(map(str, input_list))
print(' '.join(input_list))


n = int(input())
columns = input()
columns = columns.split(' ')
for i in range(n):
	columns[i] = int(columns[i])
columns.sort()
out = ''
for c in columns:
	out += str(c) + ' '
print(out)


def Gravedad(Columna, A):
	AAux = A
	for k in range(A[Columna] - 1):
		if Columna < AAux[k]:
			Columna = AAux[k]
			AAux[k] -= AAux[k] - Columna
	return Columna
N = int(input())
C = input()
C = C.split()
for k in range(len(C)):
	C[k] = int(C[k])
A = []
z = len(C) - 1
while z >= 0:
	CAux = C
	Columna = CAux[z]
	for k in range(z):
		if Columna < CAux[k]:
			s = Columna
			Columna = CAux[k]
			CAux[k] = s
	A.append(Columna)
	z -= 1
b = len(A) - 2
Rpta = A[len(A) - 1]
while b >= 0:
	Rpta = str(Rpta) + ' ' + str(A[b])
	b -= 1
print(Rpta)


n = int(input())
A = list(map(int, input().split()))
A.sort()
print(*A)


def abir():
	return map(int, input().split(' '))
a = int(input())
b = list(abir())
b.sort()
for i in range(a):
	print(b[i], end=' ')


n = int(input())
box = [int(i) for i in input().split()]
t = max(box)
list1 = []
for i in box:
	list1.append([0] * (t - i) + [1] * i)
list2 = []
for i in range(t):
	list3 = []
	for j in list1:
		list3.append(j[i])
	list2.append(sorted(list3))
output = []
for i in range(n):
	total = 0
	for j in list2:
		if j[i] == 1:
			total += 1
	output.append(str(total))
print(' '.join(output))


a = int(input())
gravity = [int(i) for i in input().split()]
gravity.sort()
print(' '.join(map(str, gravity)))


a = int(input())
k = list(map(int, input().split()))
k.sort()
print(*k)


largo = input()
array = [int(x) for x in input().split()]
array.sort()
print(' '.join((str(k) for k in array)))


n = int(input())
a = list(map(int, input().split()))
b = [0] * 228
o = [0] * n
for i in range(n):
	for j in range(a[i]):
		b[j] = b[j] + 1
for i in range(228):
	for j in range(n - b[i], n):
		o[j] = o[j] + 1
for i in range(n):
	print(o[i], end=' ')


n = int(input())
output = ''
data = [int(num) for num in input().split()]
data.sort()
for i in range(n):
	output += str(data[i]) + ' '
print(output)


n = int(input())
a = list(map(int, input().split()))
for i in range(n - 2, -1, -1):
	j = i + 1
	while j < n and a[j - 1] > a[j]:
		d = a[j - 1] - a[j]
		a[j] += d
		a[j - 1] -= d
		j += 1
for i in a:
	print(i, end=' ')


N = int(input().strip())
result = sorted(list(map(int, input().strip().split())))
print(*result)


def gravity_flip(num_list):
	result = sorted(num_list)
	for num in result:
		print(num, end=' ')
n = int(input())
L = [int(x) for x in input().split()]
gravity_flip(L)


import math
import bisect
from math import gcd, floor, sqrt, log
from collections import defaultdict as dd
I = lambda : int(input())
tup = lambda : map(int, input().split())
lst = lambda : list(map(int, input().split()))
t = 1
while t:
	n = I()
	if n == 1:
		a = int(input())
		print(a)
		break
	arr = lst()
	if n == 2:
		temp = arr[0] - arr[1]
		if temp > 0:
			arr[0] -= temp
			arr[1] += temp
		for ele in arr:
			print(ele, end=' ')
		break
	for i in range(n - 1):
		for j in range(n - 1 - i):
			if arr[j] > arr[j + 1]:
				temp = arr[j] - arr[j + 1]
				arr[j] -= temp
				arr[j + 1] += temp
	for ele in arr:
		print(ele, end=' ')
	t -= 1


s = input()
a = [int(x) for x in input().split()]
a = sorted(a)
for i in a:
	print(i, end=' ')


n = int(input())
lst = [int(s) for s in input().split()]
print(*sorted(lst))


n = int(input())
l = list(map(int, input().split()))
l = sorted(l)
r = ''
for i in l:
	r += ' ' + str(i)
print(r[1:])


_input = input('')
_list = sorted(list(map(int, input().split())))
print(*_list)


n = int(input())
l = input().split()
ll = []
for i in range(n):
	l[i] = int(l[i])
l.sort()
for i in range(len(l)):
	print(l[i], end=' ')


import sys
num_cols = sys.stdin.readline()
cols = sys.stdin.readline()
col_list = list()
col_list = cols.split()
col_list.sort(key=int)
result = ' '.join(col_list)
print(result)


_1 = '236a'
_2 = '339a'
_3 = '266a'
_4 = '96a'
_5 = '236a'
_6 = '281a'
_7 = '546a'
_8 = '116a'
_9 = '977a'
_10 = '266b'
_11 = '110a'
_12 = '41a'
_13 = '734a'
_14 = '133a'
_15 = '467a'
_16 = '158a'
_17 = '677a'
_18 = '580a'
_19 = '344a'
_20 = '1030a'
_21 = '705a'
_22 = '318a'
_23 = '479a'
_24 = '486a'
_25 = '61a'
_26 = '405a'
n = int(input())
l = list(map(int, input().split()))
l1 = []
l.sort()
for i in l:
	l1.append(str(i))
print(' '.join(l1))


n = int(input())
m = input().strip().split()
e = list(m)
for i in range(n):
	e[i] = int(e[i])
e.sort()
for i in range(n):
	e[i] = str(e[i])
x = ' '.join(e)
print(x)


colAmount = int(input())
R = input().split()
rows = []
for row in R:
	rows.append(int(row))
for i in range(len(rows) - 1, -1, -1):
	for j in range(i - 1, -1, -1):
		if rows[j] > rows[i]:
			take = rows[j] - rows[i]
			rows[i] += take
			rows[j] -= take
for i in range(len(rows)):
	if i != len(rows) - 1:
		print(rows[i], end=' ')
	else:
		print(rows[i], end='')


import sys
columns = int(input())
heights = list(map(lambda x: int(x), input().split(' ')))
list.sort(heights)
new_heights = list(map(lambda x: str(x), heights))
print(' '.join(new_heights))


from sys import stdin
stdin.readline()
nums = list(map(int, stdin.readline().split(' ')))
nums.sort()
for num in nums:
	print('{} '.format(num), end='')


n = int(input())
l = list(map(int, input().strip().split(' ')))
p = sorted(l)
l1 = [str(x) for x in p]
s = ' '.join(l1)
print(s)


from time import sleep
cantidad_cubos = int(input())
lineas = input()
lista_cubos = []
for i in lineas.split(' '):
	lista_cubos.append(int(i))
lista_cubos.sort()
ans = ''
for a in lista_cubos:
	ans = ans + str(a) + ' '
print(ans)


n = int(input())
l = [int(i) for i in input().split()]
l.sort()
s = '1'
for x in l:
	s = s + ' ' + str(x)
print(s[2:])


n = int(input())
list1 = input().split(' ')
list1.sort(key=int)
a = ' '.join(list1)
print(a)


from sys import stdin
n = stdin.readline().rstrip()
a = stdin.readline().rstrip()
x = a.split()
for i in range(len(x)):
	x[i] = int(x[i])
x.sort()
for i in range(len(x)):
	print(x[i], end=' ')


n = int(input())
x = list(map(int, input().split()))
x.sort()
for i in range(n):
	print(str(x[i]), end=' ')


n = int(input())
fridge = list(map(int, input().split()))
fridge.sort()
print(*fridge)


from sys import stdin, stdout
N = int(stdin.readline())
A = list(map(int, stdin.readline().split()))
A.sort()
stdout.write(str(' '.join(map(str, A))))


n = int(input())
a = input().split()
a1 = []
for i in range(len(a)):
	a1.append(int(a[i]))
a1.sort()
a2 = ''
for i in range(len(a1)):
	a2 += str(a1[i])
	if i < len(a1):
		a2 += ' '
print(a2)


n = int(input())
a = list(map(int, input().split()))
flag = 1
while flag:
	flag = 0
	for i in range(len(a) - 1):
		if a[i] > a[i + 1]:
			flag = 1
			(a[i], a[i + 1]) = (a[i + 1], a[i])
for i in a:
	print(i, end=' ')


columns = int(input())
cubes = list(map(int, input().split()))

def swap(cubes=[]):
	for (idx, cube) in enumerate(cubes):
		if idx < len(cubes) - 1:
			next_cube = cubes[idx + 1]
			if cube > next_cube:
				(cubes[idx], cubes[idx + 1]) = (cubes[idx + 1], cubes[idx])
	return cubes
for cube in cubes:
	swap(cubes)
print(' '.join(map(str, cubes)))


def listaSemIndex(lista, index):
	return lista[:index] + lista[index + 1:]

def aux_gerar(n, k, numeros, maior, qtd_escolhidos):
	if qtd_escolhidos == k:
		return maior
	else:
		index_maior = -1
		maior_aparente = -1
		for i in range(len(numeros)):
			aux = numeros[i] & maior
			if aux >= maior_aparente:
				maior_aparente = aux
				index_maior = i
		return aux_gerar(n, k, listaSemIndex(numeros, index_maior), maior_aparente, qtd_escolhidos + 1)

def gerar_possibilidades(n, k, numeros):
	maior = -1
	for i in range(n):
		aux = aux_gerar(n, k, listaSemIndex(numeros, i), numeros[i], 1)
		if aux >= maior:
			maior = aux
	print(maior)

def StrToInt(list_entry):
	map_object = map(int, list_entry)
	return list(map_object)

def IntToStr(list_entry):
	map_object = map(str, list_entry)
	return list(map_object)
num_entrada = int(input())
numeros = StrToInt(input().split(' '))
numeros.sort()
print(' '.join(IntToStr(numeros)))


def gravityFlip():
	(_, intsList) = (input(), input().split())
	intsList = list(map(int, intsList))
	intsList.sort()
	print(' '.join(list(map(str, intsList))))
gravityFlip()


columnas = int(input())
datos = [int(i) for i in input().split()]
datos = sorted(datos)
respuesta = ''
for i in datos:
	respuesta += str(i) + ' '
print(respuesta)


import re
n = int(input())
m = input()
r = re.split('\\s+', m)
s = []
for i in r:
	s.append(int(i))
s.sort()
for i in s:
	print(i, end=' ')


x = input()
x = int(x)
inp = list(map(int, input().split()))
inp.sort()
for n in inp:
	print(n)


n = int(input())
inp = input().split()
work = []
maxx = 0
for i in range(n):
	work.append(int(inp[i]))
	maxx = max(maxx, work[i])
work2 = []
for i in range(maxx):
	work2.append(0)
	for j in range(n):
		if work[j] >= i + 1:
			work2[i] += 1
work3 = []
for i in range(n):
	work3.append(0)
for i in range(maxx):
	for j in range(1, work2[i] + 1):
		work3[-j] += 1
for i in range(n):
	print(work3[i], end=' ')


n = int(input())
a = list(map(int, input().split()))
a.sort()
ans = []
cnt0 = 0
cnt = 0
for i in range(len(a)):
	if a[i] > cnt:
		for j in range(cnt0, cnt):
			ans.append(len(a) - i)
		cnt0 = cnt
		cnt = a[i]
print(' '.join(map(str, a)))


col = int(input())
li = [int(x) for x in input().split()]
li.sort()
for i in range(col):
	print(li[i], end=' ')


n = int(input())
list0 = [int(i) for i in input().split()]
list0.sort()
print(' '.join((str(i) for i in list0)))


def _405A(numbers):
	return sorted(numbers)
input()
print(' '.join(list(map(lambda x: str(x), _405A(list(map(lambda x: int(x), input().split())))))))


import sys
data = sys.stdin.read().strip()
data = data.split('\n')
heights = data[1].split(' ')
for (i, item) in enumerate(heights):
	heights[i] = int(item)
heights.sort()
for (i, item) in enumerate(heights):
	heights[i] = str(item)
print(' '.join(heights))


n = int(input())
v = [int(x) for x in input().split()]
v.sort()
for i in v:
	print(i, end=' ')


n = int(input())
l = [int(x) for x in input().split()]
l.sort()
for k in range(len(l)):
	print(l[k], end=' ')


n = int(input())
a = [int(v) for v in input().split()]
a.sort()
for i in range(n):
	print(int(a[i]), end=' ')


n = int(input())
x = [int(i) for i in input().split()]
x.sort()
a = ''
b = 0
for i in x:
	if b == 0:
		a += str(i)
		b += 1
	else:
		a += ' ' + str(i)
print(a)


k = input()
print(' '.join((str(i) for i in sorted([int(i) for i in input().split()]))))


c = int(input())
x = input().split(' ')
X = []
for i in range(c):
	X.append(int(x[i]))
X.sort()
for i in range(c):
	print(X[i], end=' ')


colunas = int(input())
caixas = list(map(int, input().split()))
caixas = sorted(caixas)
saida = ''
for i in range(colunas):
	saida += '%d ' % caixas[i]
print(saida.strip())


n = int(input())
A = input()
B = []
for i in A.split():
	B.append(int(i))
B.sort()
a = ''
for j in range(0, n):
	a = a + str(B[j]) + ' '
print(a)


n = int(input())
lista = [int(num) for num in input().split()]
lista.sort()
res = ''
for i in range(len(lista)):
	if i < len(lista):
		res += str(lista[i]) + ' '
print(res.strip())


n = int(input())
arr = list()
a = str()
a = input()
arr = a.split()
ans = list()
for i in range(0, len(arr)):
	ans.append(int(arr[i]))
ans.sort()
for i in range(len(ans)):
	print(ans[i], end=' ')


import sys
(n, inputt) = sys.stdin.readlines()
lista = list(map(int, inputt.rstrip('\n').split(' ')))
output = ' '.join((str(x) for x in sorted(lista)))
sys.stdout.write(output)


def gravity(l):
	l.sort()
	for i in range(0, len(l)):
		print(l[i], end=' ')
n = int(input())
l = list(map(int, input().split()))
gravity(l)


def sortirovka(a):
	b = []
	for i in range(len(a)):
		m = 0
		for j in range(len(a)):
			if a[j] < a[m]:
				m = j
		b.append(str(a.pop(m)))
	return b
input()
print(' '.join(sortirovka([int(s) for s in input().split()])))


c = int(input())
list = []
n = input().split()
for i in range(0, c):
	list.append(int(n[i]))
list.sort()
for i in list:
	print(i, end=' ')


n = int(input())
(*ar,) = map(int, input().split())
ar.sort()
for i in range(n):
	print('%d' % ar[i])


import os
n = int(input())
rows = []
cols = [0] * n
len = 0
for c in input().split(' '):
	c = int(c)
	while c > len:
		rows.append(0)
		len += 1
	for r in range(0, c):
		cols[n - 1 - rows[r]] += 1
		rows[r] += 1
result = ''
for col in cols:
	result += str(col) + ' '
print(result)


n = int(input())
blocks = list(map(int, input().split()))
blocks.sort()
out = []
for block in blocks:
	out.append(str(block))
print(' '.join(out))


n = int(input())
cube = [int(x) for x in input().split()]
cube.sort()
s = []
for i in range(n):
	s.append(str(cube[i]))
print(' '.join(s))


input()
l = sorted([int(i) for i in input().split()])
l = [str(i) for i in l]
print(' '.join(l))


n = int(input())
number_of_cubes = list(map(int, input().split()))
number_of_cubes.sort()
print(' '.join(map(str, number_of_cubes)))


n = int(input())
l = list(map(int, input().split()))
x = []
x = sorted(l)
for i in range(n):
	if i <= n - 2:
		print(x[i], end=' ')
	else:
		print(x[i])


from sys import stdin

def solve(line):
	vec = []
	for i in range(len(line)):
		vec.append(int(line[i]))
	vec.sort()
	ans = ''
	for i in range(len(line)):
		ans = ans + str(vec[i]) + ' '
	print(ans)

def main():
	x = stdin.readline().strip()
	line = stdin.readline().strip().split()
	solve(line)
main()


n = int(input())
list_input = list(map(int, input().split()))
list_input = sorted(list_input)
print(*list_input)


a = int(input())
b = [int(x) for x in input().split()]
c = max(b)
bb = [0] * c
for k in range(0, a):
	for l in range(b[k]):
		bb[l] += 1
matrix2 = [[0 for m in range(a)] for n in range(c)]
for tt in range(0, c):
	for ss in range(0, bb[tt]):
		matrix2[c - tt - 1][a - ss - 1] = 1
result = [''] * a
for i in range(0, a):
	su = 0
	for j in range(0, c):
		su += matrix2[j][i]
	result[i] = str(su)
print(' '.join(result))


n = int(input())
q = [int(k) for k in input().split(' ')]
num = []
for t in range(max(q)):
	k = 0
	for i in range(len(q)):
		if q[i] >= t + 1:
			k += 1
	num.append(k)
c = []
for t in range(n):
	k = 0
	for i in range(len(num)):
		if num[i] >= t + 1:
			k += 1
	c.append(k)
print(' '.join(list(reversed([str(x) for x in c]))))


n = int(input())
array1 = list(map(int, input().split()))
array1.sort()
print(*array1)


int(input())
ls = list(map(int, input().split()))
ls.sort()
print(*ls, sep=' ')


n = int(input())
a = [int(k) for k in input().split()]
b = [0] * 101
c = []
for i in range(n):
	b[a[i]] += 1
for i in range(101):
	if b[i] != 0:
		for j in range(b[i]):
			c.append(i)
print(*c)


n = int(input())
columns = list(map(int, input().split()))
colums = columns.sort()
output = str(columns.pop(0))
for num in columns:
	output += ' ' + str(num)
print(output)


def switchGravity(array):
	array.sort()
	return array
n = int(input(''))
if n > 0:
	if n == 1:
		oneNumber = int(input(''))
		print(oneNumber)
	else:
		arrayBox = list(map(int, input('').strip().split()))[:n]
		switchGravity(arrayBox)
		print(*arrayBox)
else:
	print('Please input number of collumns as an integer > 0!')


n = int(input())
s = list(map(int, input().split()))
s.sort()
s1 = ''
for (ind, i) in enumerate(s):
	s1 += str(i) + ' '
print(s1)


def get():
	return [int(x) for x in input().split()]
input()
l = get()
l.sort()
print(*l)


qtd = int(input())
vetor = list(map(int, input().split()))
vetor.sort()
print(*vetor)


a = int(input())
c = a - 1
b = [int(k) for k in input().split(' ')]
b.sort()
mensaje = ''
for k in range(a):
	mensaje = mensaje + str(b[k]) + ' '
print(mensaje)


n = int(input())
arr = input().split()
arr = [int(i) for i in arr]
for i in range(len(arr)):
	i = 0
	while i < len(arr) - 1:
		if arr[i] > arr[i + 1]:
			diff = arr[i] - arr[i + 1]
			arr[i + 1] += diff
			arr[i] -= diff
		i += 1
print(' '.join([str(s) for s in arr]))


def deslocar(a):
	while a >= 0:
		for i in range(m):
			j = a
			while j < n - 1:
				if nn[i][j] == 1 and nn[i][j + 1] == 0:
					nn[i][j] = 0
					nn[i][j + 1] = 1
				j += 1
		a -= 1
n = int(input())
a = list(map(int, input().split(' ')))
m = max(a)
nn = [n * [0] for x in range(m)]
j = 0
for cubo in a:
	position = m - cubo
	while position >= 0 and position < m:
		nn[position][j] = 1
		position = position + 1
	j += 1
deslocar(n - 2)
out = []
for j in range(n):
	k = 0
	for i in range(m):
		if nn[i][j] == 1:
			k = k + 1
	out.append(k)
print(' '.join(map(str, out)))


import sys
lines = sys.stdin.readlines()
n = int(lines[0].strip())
nums = list(map(int, lines[1].strip().split(' ')))
nums.sort()
print(' '.join(list(map(str, nums))))


n = int(input())
d = list(map(int, input().split()))
c = sorted(d)
for i in range(len(c)):
	print('{} '.format(c[i]))


from sys import stdin, stdout
q = int(stdin.readline().rstrip())
numeros = stdin.readline().rstrip()
numeros = numeros.split(' ')
numeros_real = list(map(int, numeros))
numeros_real.sort()
string = ''
for numero in numeros_real:
	string = string + str(numero) + ' '
stdout.write(string)


n = int(input())
cols = [int(i) for i in input().split()]
rows = [len([j for j in cols if j + i >= max(cols)]) for i in range(max(cols))]
rows.append(n)
for i in range(n):
	r = 0
	while rows[r] + i < n:
		r += 1
	print(max(cols) - r, end=' ')


n = int(input())
a = list(map(int, input().split()))
a.sort()
ret = ''
for el in a:
	ret += str(el) + ' '
print(ret[:-1])


n = input()
y = 0
d = list(map(int, input().split(' ')))
y = sorted(d)
print(*y)


c = int(input())
m = [int(x) for x in input().split()]
m.sort()
for x in m:
	print(x, end=' ')


columns = int(input())
numbers = list(map(lambda x: int(x), input().split()))
numbers.sort()
numbers = list(map(lambda x: str(x), numbers))
print(' '.join(numbers))


import sys
from math import ceil, log
RI = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('Yes')

def NO():
	print('No')
INF = 10 ** 18
MOD = 10 ** 9 + 7
n = int(ri())
a = RI()
print(*sorted(a))


n1 = int(input())
n = sorted([int(x) for x in input().split()])
for i in n:
	print(i, end=' ')


from sys import stdin
n = stdin.readline()
A = map(int, stdin.readline().split())
print(*sorted(A))


input()
b = list(map(int, input().split()))
b = [str(x) for x in sorted(b)]
print(' '.join(b))


n = int(input())
l = [int(i) for i in input().split()]
k = sorted(l)
print(*k)


n = input()
x = input().split()
s = []
for i in x:
	k = int(i)
	s.append(k)
s.sort()
l = []
for i in s:
	m = str(i)
	l.append(m)
print(' '.join(l))


n = int(input())
lists = [int(i) for i in input().split()]
lists.sort()
for i in lists:
	print(i, end=' ')


n = int(input())
l = input().split()
l = [int(a) for a in l]
l.sort()
s = ''
for x in range(n):
	s += '%i ' % l[x]
print(s)


n = int(input())
l = [int(i) for i in input().split()]
l2 = []
for i in range(n):
	l2.append(l[i])
l2.sort()
s = ''
for i in range(n):
	s = s + str(l2[i]) + ' '
print(s)


ncolumnas = int(input())
columnas = list(map(int, input().split()))
rcolumnas = list(reversed(columnas))
for j in range(ncolumnas):
	for i in range(ncolumnas):
		if i < ncolumnas - 1:
			if rcolumnas[i] < rcolumnas[i + 1]:
				viejo = rcolumnas[i]
				rcolumnas[i] = rcolumnas[i + 1]
				rcolumnas[i + 1] = viejo
rcolumnasfinal = list(reversed(rcolumnas))
print(' '.join((str(e) for e in rcolumnasfinal)))


__author__ = 'dougct'

def main():
	n = int(input())
	print(*sorted(list(map(int, input().split()))))
main()


def solve(columnHeights):
	return ' '.join((str(columnHeight) for columnHeight in sorted(columnHeights)))
n = int(input())
columnHeights = map(int, input().split(' '))
print(solve(columnHeights))


n = int(input())
st = [int(x) for x in input().split(' ')]
st.sort()
for i in st:
	print(i, end=' ')


input()
willand = map(str, sorted(map(int, input().split())))
print(' '.join(willand))


n = int(input())
x = [int(x) for x in input().split()]
ok = True
while ok:
	ok = False
	for i in range(n - 1):
		if x[i] > x[i + 1]:
			(x[i], x[i + 1]) = (x[i + 1], x[i])
			ok = True
print(*x)


a = [3, 4, 2, 1, 8, 5, 6]

def ins2(n, x):
	if n == 0 or a[n - 1] < a[n]:
		return x
	temp = a[n]
	a[n] = a[n - 1]
	a[n - 1] = temp
	return ins2(n - 1, x + 1)

def ins1(n, x):
	if n == x:
		return ins2(x, 0)
	return ins2(x, 0) + ins1(n, x + 1)
input()
a = list(map(int, input().split()))
_ = ins1(len(a) - 1, 0)
print(*a)


numOfColumns = int(input())
numbers = input()
numbers = numbers.split(' ')
for k in range(0, len(numbers)):
	numbers[k] = int(numbers[k])
for i in range(0, len(numbers) - 1):
	for j in range(0, len(numbers) - 1):
		if numbers[j] > numbers[j + 1]:
			holder = numbers[j + 1]
			numbers[j + 1] = numbers[j]
			numbers[j] = holder
for i in range(0, len(numbers)):
	print(numbers[i], end=' ')


n = int(input())
x = input()
xx = x.split()
for i in range(0, n):
	xx[i] = int(xx[i])
xx.sort()
for i in xx:
	print(i, end=' ')


a = input()
b = input().split()
a = []
for i in b:
	a.append(int(i))
b = sorted(a)
z = ''
for i in b:
	z = z + str(i) + ' '
print(z[:len(z) - 1])


n = int(input())
nums = [int(x) for x in input().split()]
nums = list(sorted(nums))
for i in range(n):
	print(nums[i])


n = int(input())
l = [int(i) for i in input().split()]
l.sort()
o = []
for i in range(n):
	o.append(str(l[i]))
print(' '.join(o))


columns = int(input())
square = input().split()
gravity = []
for x in square:
	gravity.append(int(x))
gravity.sort()
print(' '.join(map(str, gravity)))


columns = int(input())
cubes = input().split(' ')
cubes = [int(i) for i in cubes]
cubes = sorted(cubes)
cubes = [str(i) for i in cubes]
print(' '.join(cubes))


n = int(input())
l = []
l = input().split()
for i in range(len(l)):
	l[i] = int(l[i])
l.sort()
count = 0
for i in l:
	print(i, end=' ')
	count += 1
	if count % 10 == 0:
		print(end='\n')


from sys import stdin
stdin.readline()
list = [int(x) for x in stdin.readline().rstrip().split()]
list.sort()
output = ''
for x in list:
	output += str(x) + ' '
print(output[:-1])


n = input()
list1 = []
str1 = input()
list2 = str1.split(' ')
list2_length = len(list2)
i = 0
while i <= list2_length - 1:
	list1.append(int(list2.pop()))
	i += 1
list1.sort()
print(*list1)


while True:
	try:
		n = int(input())
		print(*sorted(map(int, input().split())))
	except EOFError:
		break


def _box(col, _list):
	_list.sort()
	return ' '.join(map(str, _list))
n_columns = input()
_list = list(map(int, input().split()))
print(_box(n_columns, _list))


n = eval(input())
x = input()
array = [int(i) for i in x.split()]
sort = False
while not sort:
	sort = True
	for i in range(n - 1):
		if array[i] > array[i + 1]:
			temp = array[i]
			array[i] = array[i + 1]
			array[i + 1] = temp
			sort = False
for i in range(n):
	print(array[i])


x = input()
cols = input().split(' ')

def flip_gravity(cols):
	if not cols:
		return
	cols.sort()
	output = ''
	for i in cols:
		output += str(i) + ' '
	print(output[:-1])
strinput = list(map(lambda x: int(x), cols))
flip_gravity(strinput)


t = int(input())
x = [int(i) for i in input().split()]
y = sorted(x)
for i in y:
	print(i, end=' ')


nBox = int(input())
userInput = input()
data = userInput.split()
data = map(int, data)
arr = []
for i in data:
	arr.append(i)
arr = sorted(arr)
for i in arr:
	print(i, end=' ')


cols = int(input())
numbers = input().split(' ')
for n in range(cols):
	for i in range(cols):
		if i + 1 < cols:
			if int(numbers[i]) > int(numbers[i + 1]):
				(numbers[i + 1], numbers[i]) = (numbers[i], numbers[i + 1])
print(' '.join(numbers))


n = int(input())
l = [int(i) for i in input().split()]
m = [i for i in l]
a = min(l)
for i in range(len(l)):
	l[i] -= a
l.sort()
for i in range(len(l)):
	m[i] = a + l[i]
for i in range(len(m)):
	print(m[i], end=' ')


n = int(input())
arr = [int(elem) for elem in input().split(' ')]
for i in range(n - 1):
	for j in range(i + 1, n):
		if arr[j] < arr[i]:
			(arr[i], arr[j]) = (arr[j], arr[i])
print(' '.join([str(num) for num in arr]))


n = int(input())
arr = list(map(int, input().split()))
arr.sort()
for i in arr:
	print(i)


size = input()
raw_heights = list(map(int, input().split()))
raw_heights.sort()
print(*raw_heights)


import sys
n = int(sys.stdin.readline())
line = sorted(list(map(int, sys.stdin.readline().split())))
s = ''
for i in line:
	s += str(i) + ' '
print(s[:-1])


n = int(input())
colunas = list(map(int, input().split()))
res = []
while len(colunas) > 0:
	menor = 1000
	imenor = -1
	for i in range(len(colunas)):
		if colunas[i] <= menor:
			menor = colunas[i]
			imenor = i
	del colunas[imenor]
	res.append(menor)
print(*res)


input()
col = list(map(int, input().split()))
print(*sorted(col), sep=' ')


n = int(input())
a = list()
s = map(int, input().split(' '))
k = list()
a = a + sorted(list(s))
for i in range(len(a)):
	k = k + [str(a[i])]
print(' '.join(k))


import sys
data = sys.stdin.readlines()
lista = data[1].strip('\n').split(' ')
lista = [int(x) for x in lista]
lista.sort()
lista = [str(x) for x in lista]
print(' '.join(lista))


x = int(input())
y = list(map(int, input().split()))
y.sort()
for g in range(x):
	print(y[g], end=' ')


c = int(input())
a = [int(i) for i in input().split()]
a.sort()
for i in range(c - 1):
	print(a[i], end=' ')
print(a[-1])


input()
blocks = [int(x) for x in input().split()]
blocks.sort()
print(' '.join((str(x) for x in blocks)))


n = int(input())
a = list(map(int, input().rstrip().split()))
maxm = max(a)
mat1 = []
for i in range(maxm):
	mat = [0] * n
	mat1 += [mat]
for i in range(n):
	x = a[i]
	while x > 0:
		mat1[x - 1][i] = 1
		x -= 1
mat2 = []
for x in mat1:
	x.sort()
	mat2 += [x]
for i in range(n):
	t = 0
	for j in range(maxm):
		t += mat2[j][i]
	print(t, end=' ')


import sys

def rl():
	return sys.stdin.readline().strip()

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

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

def rln(n):
	l = [None] * n
	for i in range(n):
		l[i] = int(rl())
	return l
n = int(input())
tab = rn()
print(' '.join(map(str, sorted(tab))))


import sys

def rl():
	return sys.stdin.readline().strip()

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

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

def rln(n):
	l = [None] * n
	for i in range(n):
		l[i] = int(rl())
	return l
n = int(input())
tab = rn()
for _ in range(101):
	for i in range(1, n):
		diff = max(tab[i - 1] - tab[i], 0)
		tab[i] += diff
		tab[i - 1] -= diff
print(' '.join(map(str, tab)))


n = int(input())
my_list = list(map(int, input().split()))
print(*sorted(my_list))


n = int(input())
s = n
new_list = []
word = input()
new_list = word.split()
j = 0
for j in range(n):
	new_list[j] = int(new_list[j])
	j += 1
new_list.sort()
for i in new_list:
	print(i, end=' ')


n = int(input())
a = input().split()
x = 0
while x < len(a):
	a[x] = int(a[x])
	x = x + 1
a.sort()
y = 0
z = ''
while y < len(a):
	z = z + str(a[y]) + ' '
	y = y + 1
print(z)


n = int(input())
cube = [int(i) for i in input().split()]
cube = sorted(cube)
cube = str(cube)
cube = cube.replace('[', '')
cube = cube.replace(']', '')
cube = cube.replace(',', '')
print(cube)


In = input()
v = list(map(int, input().split()))
v.sort()
print(*v)