program zad1;
type num = record
    sort:int64;
    orig:int64;
    len:int64;
    max:byte;
end;
var a:array[1..3] of num;
  i,j,k:longint;
  temp:int64;
  tempn:num;
  maxdig:byte;
begin
  for i:=1 to 3 do
    read(a[i].orig);
  for i:=1 to 2 do
    for j:=i+1 to 3 do
    if a[i].orig<a[j].orig then
      begin
        tempn:=a[i];
        a[i]:=a[j];
        a[j]:=tempn;
      end;
  for i:=1 to 3 do
    begin
      temp:=a[i].orig;
      k:=0;
      while temp<>0 do
        begin
          temp:=temp div 10;
          k:=k+1;
        end;
      a[i].len:=k;
      temp:=a[i].orig;
      while temp div 10<>0 do
        temp:=temp div 10;
      a[i].max:=temp;
    end;
  a[1].sort:=a[1].orig;
  for i:=2 to 3 do
    begin
      maxdig:=0;
      for j:=1 to 3 do
        if (maxdig<a[j].max) and (i<>j) then maxdig:=a[j].max;
      a[i].sort:=a[i].orig;
      for j:=1 to a[1].len-a[i].len do
        a[i].sort:=a[i].sort*10+maxdig;
    end;
  for i:=1 to 2 do
    for j:=i+1 to 3 do
      if a[i].sort<a[j].sort then
        begin
          tempn:=a[i];
          a[i]:=a[j];
          a[j]:=tempn;
        end;
  for i:=1 to 3 do
    write(a[i].orig);
end.