n=int(input()) a=input().split() b=list(a) b.sort(key=None, reverse=True) for i in b: print(int(i), end='')