nums = [int(x) for x in input()] nums.sort(reverse=True) print(''.join([str(x) for x in nums]))
array = input() for i in range(9, -1, -1): for j in array: if int(j) == i: print(i, end='')