n = input() r = [] c = 0 for i in n[::-1]: r.append(i) c += 1 if c%3==0: r.append(",") if r[-1] == ",": r.pop() print("".join(r[::-1]))