def letterSort(l):
  return l[1]
  
list = input().split()
n = len(list)

list.sort(key = letterSort)

print(*list)