s = input() ans = [] for i ,c in enumerate(s[::-1]): if i % 3 == 0 and i != 0: ans.append(",") ans.append(c) print("".join(ans))