begin
var a := ArrRandom(ReadInteger('n='), -50, 50);
a.Println;
a := a[::2].Sorted.Interleave(a[1::2]).ToArray;
a.Println
end.
begin
var a := ArrRandom(ReadInteger('n='), -50, 50);
a.Println;
a := a[::2].Sorted.Interleave(a[1::2]).ToArray;
a.Println
end.