S=input() L=len(S) T=[] r = L % 3 if r: T.extend(S[0:r]) for i in range(r, L, 3): if i != 0 or r != 0: T.append(',') T.extend(S[i:i+3]) print(''.join(T))