Program massivy;
var array1: array [1..10] of integer;
i, b:integer;
begin
for i:=1 to 10 do
array1[i]:=random(-10, 10);
for i:=1 to 4 do begin
for b:=1 to 4 do
if array1[b] > array1[b+1] then
swap(array1[b], array1[b+1]);
end;
for i:=5 to 9 do begin
for b:=5 to 9 do
if array1[b] < array1[b+1] then
swap(array1[b], array1[b+1]);
end;
for i:=1 to 10 do
writeln(array1[i]);
end.