# your code goes here
tupla=input()
stringa=tupla[0]
for i in range(1,len(tupla)-1):
stringa=stringa + " , "
stringa=stringa + tupla[i]
stringa=stringa + " e "
stringa=stringa + tupla[len(tupla)-1]
print stringa
IyB5b3VyIGNvZGUgZ29lcyBoZXJlCnR1cGxhPWlucHV0KCkKc3RyaW5nYT10dXBsYVswXQpmb3IgaSBpbiByYW5nZSgxLGxlbih0dXBsYSktMSk6CglzdHJpbmdhPXN0cmluZ2EgKyAiICwgIgoJc3RyaW5nYT1zdHJpbmdhICsgdHVwbGFbaV0KCXN0cmluZ2E9c3RyaW5nYSArICIgZSAiIAoJc3RyaW5nYT1zdHJpbmdhICsgdHVwbGFbbGVuKHR1cGxhKS0xXQpwcmludCBzdHJpbmdhCg==