import math N = input() l = list(N) count_d = math.ceil(len(N) / 3) - 1 l.reverse() for i in range(count_d): ins = (i + 1) * 3 + i l.insert(ins, ",") l.reverse() ans = "" for l_i in l: ans += l_i print(ans)