1427번
n = int(input())
li = []
for i in str(n):
li.append(int(i))
li.sort(reverse=True)
for i in li:
print(i, end='')
11650번
n = int(input())
li = []
for _ in range(n):
[x, y] = map(int, input().split())
li.append([x, y])
s_li = sorted(li)
for i in range(n):
print(s_li[i][0], s_li[i][1])
11651번
n = int(input())
li = []
for _ in range(n):
[x, y] = map(int, input().split())
li.append([y, x])
s_li = sorted(li)
for i in range(n):
print(s_li[i][1], s_li[i][0])
1181번
n = int(input())
li = []
for i in range(n):
li.append(input())
li = list(set(li))
li.sort()
li.sort(key = len)
for i in li:
print(i)