N = input() A = [] for i, s in enumerate(reversed(N)): A.append(s) if i % 3 == 2 and i != len(N) - 1: A.append(",") print("".join(reversed(A)))