# No.784 「,(カンマ)」 n = input() r = n[::-1] result = r[0] for i in range(1, len(r)): if i % 3 == 0: result += ',' result += r[i] print(result[::-1])