procedure Sort(var a,b,c: Integer);
var
a1,b1,c1: Integer;
begin
a1:=a; b1:=b; c1:=c;
if (a<=b) and (a<=c) and (b<=c) then begin a:=a1;b:=b1;c:=c1; end else
if (a<=b) and (a<=c) and (c<=b) then begin a:=a1;b:=c1;c:=b1; end else
if (b<=a) and (b<=c) and (a<=c) then begin a:=b1;b:=a1;c:=c1; end else
if (b<=a) and (b<=c) and (c<=a) then begin a:=b1;b:=c1;c:=a1; end else
if (c<=a) and (c<=b) and (a<=b) then begin a:=c1;b:=a1;c:=b1; end else
if (c<=a) and (c<=b) and (b<=a) then begin a:=c1;b:=b1;c:=a1; end;
end;