program zad1;
type num = record
    sort:int64;
    orig:int64;
    len:int64;
    digit:integer;
end;
var a:array[1..3] of num;
  i,j,k,mxdig:longint;
  temp:int64;
  tempn:num;
begin
  mxdig:=0;
  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;
      if temp > mxdig then mxdig:=temp;
    end;
  a[1].sort:=a[1].orig;
  for i:=2 to 3 do
    begin
      a[i].sort:=a[i].orig;
      for j:=1 to a[1].len-a[i].len do
        a[i].sort:=a[i].sort*10+mxdig;
    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.