n=input()
n=n[::-1]
number=[]
cnt=1
for i in range(len(n)):
if cnt%3==0:
number.append(n[i])
if cnt<len(n):
number.append(',')
cnt+=1
else:
number.append(n[i])
cnt+=1
number=number[::-1]
for x in number:
print(x,end='')