var
  i, j, n: longint;
  a: array[1..100] of string;
  s, t: string;

begin
  reset(input, 'number.in');
  rewrite(output, 'number.out');
  while not seekeof do
  begin
    inc(n);
    read(a[n]);
  end;
  for j := 1 to n - 1 do
    for i := 1 to n - 1 do
    begin
      s := a[i] + a[i + 1];
      t := a[i + 1] + a[i];
      if s < t then
      begin
        s := a[i];
        a[i] := a[i+1];
        a[i+1] := s;
      end;
    end;
  for i := 1 to n do
    write(a[i]);
  writeln;
  close(input);
  close(output);
end.