a = []
for i in range(14):
a.append(int(input("Ввести "+str(i+1)+" элемент:")))
for i in range(0,7):
for j in range(0,6):
if a[j] > a[j+1]:
d = a[j]
a[j] = a[j+1]
a[j+1] = d
for i in range(7,14):
for j in range(7,13):
if a[j] < a[j+1]:
print(a)
a = []
for i in range(14):
a.append(int(input("Ввести "+str(i+1)+" элемент:")))
for i in range(0,7):
for j in range(0,6):
if a[j] > a[j+1]:
d = a[j]
a[j] = a[j+1]
a[j+1] = d
for i in range(7,14):
for j in range(7,13):
if a[j] < a[j+1]:
d = a[j]
a[j] = a[j+1]
a[j+1] = d
print(a)