num=input() if len(num)<4: print(num) exit() n=len(num)%3 if n!=0: print(num[0:n]+",",end="") for i in range(n,len(num),3): if i==len(num)-3: print(num[i:i+3]) else: print(num[i:i+3]+",",end="")