N = input() ans = '' for i in range(len(N), 0, -3): st = i - 3 if st < 0: st = 0 ans = N[st:i] + ',' + ans print(ans[0:-1])