Given the list of numbers, you are to sort them in non decreasing order.

-----Input-----
t – the number of numbers in list, then t lines follow [t <= 10^6]. 

Each line contains one integer: N [0 <= N <= 10^6]

-----Output-----
Output given numbers in non decreasing order.

-----Example-----
Input:
5
5
3
6
7
1

Output:
1
3
5
6
7

Difficulty: EASY
Tags: Sorting

Data structures

Implementation
Skill types: Sorting

Data structures

Starter code:

Solutions:
n = int(input())
l = []
for i in range(n):
	l.append(int(input()))
for i in sorted(l):
	print(i)


l = []
t = int(input())
while t > 0:
	n = int(input())
	l.append(n)
	t -= 1
l.sort()
for i in range(0, len(l)):
	print(l[i])


l = []
for _ in range(int(input())):
	n = int(input())
	l.append(n)
z = sorted(l)
for i in z:
	print(i)


t = int(input())
srt = []
for i in range(t):
	n = int(input())
	srt.append(n)
srt.sort()
for i in srt:
	print(i)


t = int(input())
lists = []
for i in range(0, t):
	a = int(input())
	lists.append(a)
lists = sorted(lists)
for j in lists:
	print(j)


t = int(input())
list_to_tri = []
for i in range(t):
	list_to_tri.append(int(input()))
list_to_tri.sort()
for i in list_to_tri:
	print(i)


n = int(input())
a = []
for i in range(n):
	a.append(int(input()))
a = sorted(a)
for i in range(n):
	print(a[i])


t = int(input())
lst = []
for i in range(t):
	lst.append(int(input()))
lst.sort()
for i in range(t):
	print(lst[i])


n = int(input())
lst = []
for i in range(n):
	lst.append(int(input()))
lst.sort()
for i in range(n):
	print(lst[i])


li = []
tc = int(input())
while tc > 0:
	n = int(input())
	li.append(n)
	tc -= 1
li.sort()
for i in range(0, len(li)):
	print(li[i])


ls = []
for i in range(int(input())):
	ls.append(int(input()))
ls.sort()
for i in ls:
	print(i)


try:
	list1 = []
	for _ in range(int(input())):
		list1.append(int(input()))
	list1.sort()
	for i in list1:
		print(i)
except:
	pass


n = int(input())
A = []
for i in range(n):
	A.append(int(input()))
for t in sorted(A):
	print(t)


N = int(input())
l = []
for N in range(N):
	l.append(int(input()))
Result = sorted(l)
for R in Result:
	print(R)


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


def sort_array(array):
	array.sort()
	for i in range(len(array)):
		print(array[i])
t = int(input())
array = []
for _ in range(t):
	inp = int(input())
	array.append(inp)
sort_array(array)


n = int(input())
a = []
for i in range(0, n):
	no = int(input())
	a.append(no)
a.sort()
for i in range(0, n):
	print(a[i])


t = int(input())
lst = []
for _ in range(t):
	x = int(input())
	lst.append(x)
lst.sort()
for i in lst:
	print(i)


Test = input()
T = int(Test)
L = []
for t in range(T):
	Num = input()
	N = int(Num)
	L.append(N)
L.sort()
Leng = len(L)
for l in range(Leng):
	print(L[l])


lis = []
t = int(input())
while t > 0:
	n = int(input())
	lis.append(n)
	t -= 1
lis.sort()
for i in lis:
	print(i)


n = int(input())
mylist = []
while n > 0:
	b = int(input())
	mylist.append(b)
	n = n - 1
print()
mylist.sort()
for i in mylist:
	print(i)


x = int(input())
li = []
for i in range(x):
	y = int(input())
	li.append(int(y))
li.sort()
for i in li:
	print(i)


t = int(input())
ls = []
for _ in range(t):
	ls.append(int(input()))
ls.sort()
for item in ls:
	print(item)


x = int(input())
lst = []
for i in range(0, x):
	y = int(input())
	lst.append(y)
lst.sort()
for i in range(0, x):
	print(lst[i])


n = int(input())
x = []
for i in range(n):
	x.append(int(input()))
x = sorted(x)
for i in x:
	print(i)


an = []
for _ in range(int(input())):
	n = int(input())
	an.append(n)
bn = sorted(an)
for i in bn:
	print(i)


n = int(input())
array = []
for i in range(n):
	k = int(input())
	array.append(k)
array.sort()
for i in range(n):
	print(array[i])


list1 = []
t = int(input())
while t > 0:
	num = int(input())
	list1.append(num)
	t -= 1
list1.sort()
for i in range(0, len(list1)):
	print(list1[i])


s = int(input())
l = []
for i in range(s):
	t = int(input())
	l.append(t)
l.sort()
for i in l:
	print(i)


t = int(input())
a = list()
for i in range(t):
	a.append(int(input()))
a.sort()
for i in a:
	print(i)