"""
Question 8
Question:
Write a program that accepts a comma separated sequence of words as input
and prints the words in a comma-separated sequence after sorting them alphabetically.

Suppose the following input is supplied to the program:

without,hello,bag,world

Then, the output should be:

bag,hello,without,world

Hints:
In case of input data being supplied to the question, it should be assumed to be a console input.
"""

'''Solution by Poonam-glitch
'''
def my_func(e):
    return e[0]


my_list = input('Enter a comma separated string: ').split(',')

my_list.sort(key=my_func)

print(",".join(my_list))

