g = list(input().split()) for i in range(len(g)): for p in range(len(g) - 1): if int(g[p + 1] + g[p]) > int(g[p] + g[p + 1]): g[p], g[p + 1] = g[p + 1], g[p] print(*g,sep='')