program Nadovezivanje;
uses sysutils;
var
n1,n2,n3,temp:longint;
begin
read(n1);
read(n2);
readln(n3);

if (LeftStr(inttostr(n2),1))<(LeftStr(inttostr(n3),1)) then
    begin
    temp:=n2;
    n2:=n3;
    n3:=temp;
    end
        else if (LeftStr(inttostr(n2),1))=(LeftStr(inttostr(n3),1)) then
            if n2<n3 then
            begin
            temp:=n2;
            n2:=n3;
            n3:=temp;
            end;
            
if (LeftStr(inttostr(n1),1))<(LeftStr(inttostr(n2),1)) then
    begin
    temp:=n1;
    n1:=n2;
    n2:=temp;
    end
        else if (LeftStr(inttostr(n1),1))=(LeftStr(inttostr(n2),1)) then
            if n2<n3 then
            begin
            temp:=n1;
            n1:=n2;
            n2:=temp;
            end;

if (LeftStr(inttostr(n2),1))<(LeftStr(inttostr(n3),1)) then
    begin
    temp:=n2;
    n2:=n3;
    n3:=temp;
    end
        else if (LeftStr(inttostr(n2),1))=(LeftStr(inttostr(n3),1)) then
            if n2<n3 then
            begin
            temp:=n2;
            n2:=n3;
            n3:=temp;
            end;

write(n1,n2,n3);
end.