var i1,i2,i3:integer;
ia:array [1..6] of integer;
begin
ia[1]:=1+a*10;
ia[2]:=2+b*10;
ia[3]:=3+c*10;
ia[4]:=4+d*10;
ia[5]:=5+e*10;
ia[6]:=6+f*10;
for i1:=1 to 5do
begin
i3:=i1;
for i2:=i1+1 to 6do
begin
if ia[i3]>ia[i2] then
i3:=i2;
end;
if i1<>i3 then
begin
i2:=ia[i1];
ia[i1]:=ia[i3];
ia[i3]:=i2;
end;
end;
Memo1.Text:='';
for i1:=1 to 6do
begin
// Memo1.Lines.Add(IntToStr(ia[i1] mod 10)+' '+IntToStr(ia[i1] div 10));
Memo1.Lines.Add(chr(96+ia[i1] mod 10)+' '+IntToStr(ia[i1] div 10));
end;
end;