uses Lists;
var
 List:Plist;
begin
 List:=nil;
 AddItem(List,-100,1);
 AddItem(List,10,1);
 AddItem(List,-2,2);
 AddItem(List,3,2);
 Sort(List);
 WriteLn('Stup');
 WriteLn(GetItem(List,1),#10#13,GetItem(List,2),#10#13,GetItem(List,3),#10#13,
         GetItem(List,4));
 DeleteItem(List,1);
 DeleteItem(List,1);
 DeleteItem(List,1);
 DeleteItem(List,1);
end.