program agenti;
var
  a:array[1..100000] of char;
  next:array[1..100000] of longint;
  i,k,n:longint;
  ch:char;
procedure sort(l,r:longint);
var
  i,j:longint;
  k,t:longint;
begin
  i:=l;
  j:=r;
  k:=next[(i+j) div 2];
  while i<=j do
    begin
      while (a[next[i]]<a[k]) or ((a[next[i]]=a[k]) and (next[i]<k)) do inc(i);
      while (a[k]<a[next[j]]) or ((a[next[j]]=a[k]) and (k<next[j])) do dec(j);
      if i<=j then
        begin
          t:=next[i];
          next[i]:=next[j];
          next[j]:=t;
          inc(i);
          dec(j)
        end
    end;
  if i<r then sort(i,r);
  if l<j then sort(l,j)
end;
begin
  assign(input,'agenti.in');
  reset(input);
  readln(k);
  n:=0;
  while not eof do
    begin
      read(ch);
      inc(n);
      a[n]:=ch;
      next[n]:=n
    end;
  close(input);
  sort(1,n);
  assign(output,'agenti.out');
  rewrite(output);
  for i:=1 to n do
    begin
      k:=next[k];
      write(a[k])
    end;
  close(output)
end.