a = [i for i in input().split()]


def key(a):
    return a[1]


a = sorted(a, key=key)
print(*a)