n = input() listed_m = list(str(n)) listed_m.reverse() list_buf = [] for i in range(len(listed_m)): if i % 3 == 0 and i != 0: list_buf.append(',') list_buf.append(listed_m[i]) list_res = list(reversed(list_buf)) res = ''.join(list_res) print(res)