type z=array of integer;
var a: z;
i,j,k: integer;
begin
setlength(a,1);
readln(a[0]);
i:=1;
while(a[i-1]<>0) do
setlength(a,i+1);
readln(a[i]);
i:=i+1;
end;
setlength(a,length(a)-1);
for i:=0 to length(a) do
for j:=0 to length(a)-2 do
if (a[j] < a[j+1]) then
k:=a[j];
a[j]:= a[j+1];
a[j+1]:=k;
write(a[0],'; ',a[1],'; ',a[2],'; ',a[3]);
end.
type z=array of integer;
var a: z;
i,j,k: integer;
begin
setlength(a,1);
readln(a[0]);
i:=1;
while(a[i-1]<>0) do
begin
setlength(a,i+1);
readln(a[i]);
i:=i+1;
end;
setlength(a,length(a)-1);
for i:=0 to length(a) do
for j:=0 to length(a)-2 do
if (a[j] < a[j+1]) then
begin
k:=a[j];
a[j]:= a[j+1];
a[j+1]:=k;
end;
write(a[0],'; ',a[1],'; ',a[2],'; ',a[3]);
end.