import sys arr = list(map(str, sys.stdin.readline().split())) n = 1 while n < len(arr): for i in range(len(arr) - n): if arr[i][1] > arr[i + 1][1]: arr[i], arr[i + 1] = arr[i + 1], arr[i] n += 1 print(*arr)