program zadatak;
var
x,y,z,m,pom1:int64;
t,i,brojb,brojc,f,t1,t2,t3:integer;
a: array[1..20] of real;
b:array[1..20] of real;
c:array[1..20] of real;
pom:real;
begin
read(x,y,z);
brojb:=0;
brojc:=0;
pom:=0;
pom1:=0;
for t:=1 to 20 do
    begin
    a[t]:=0;
    b[t]:=0;
    c[t]:=0;
    end;
m:=x;
i:=20;
while (m>0) do
      begin
      a[i]:=m div 10;
      i:=i-1;
      m:=m div 10;
      end;
m:=y;
i:=20;
while (m>0) do
      begin
      b[i]:= m div 10;
      i:=i-1;
      m:= m div 10;
      end;
m:=z;
i:=20;
while (m>0) do
      begin
      c[i]:= m div 10 ;
      i:=i-1;
      m:= m div 10 ;
      end;
for t:=1 to 20 do
    begin
    if f=0 then
       if a[t]=0 then t1:=t
       else f:=1;
    end;
f:=0;
for t:=1 to 20 do
    begin
    if f=0 then
     if b[t]=0 then t2:=t
        else f:=1;
     end;
f:=0;
for t:=1 to 20 do
    begin
    if f=0 then
       if c[t]=0 then t3:=t
          else f:=1;
    end;
for t:=1 to 20 do
    if t+t1<=20 then
    begin
     a[t]:=a[t1+t];
     end;

for t:=1 to 20 do
    if t+t2<=20 then
    begin
    b[t]:=b[t+t2];
    end;
for t:=1 to 20 do
    if t+t3<=20 then
    begin
    c[t]:=c[t+t2];
    end;




for t:=1 to 20 do
    begin
    if b[t]>a[t] then brojb:=1
    else brojb:=0;
    end;
if brojb=1 then
   begin
   pom1:=x;
   x:=y;
   y:=pom1;
   for t:=1 to 20 do
   begin
    pom:=a[t];
    a[t]:=b[t];
    b[t]:=pom;
   end;
   end;
for t:=1 to 20 do
    begin
    if c[t]>b[t] then brojc:=1
    else brojc:=0;
    end;
if brojc=1 then
   begin
   pom1:=y;
   y:=z;
   z:=pom1;
   for t:=1 to 20 do
       begin
       pom:=b[t];
       b[t]:=c[t];
       c[t]:=pom;
       end;
       end;
brojb:=0;
for t:=1 to 20 do
    begin
    if b[t]>a[t] then brojb:=1
    else brojb:=0;
    end;
if brojb=1 then
   begin
   pom1:=x;
   x:=y;
   y:=pom1;
   for t:=1 to 20 do
       begin
       pom:=a[t];
       a[t]:=b[t];
       b[t]:=pom;
       end;
       end;
write(x,y,z);
end.