data_test = input() count_t = 0; out_t = '' new_str = data_test[::-1] for num in new_str: count_t += 1; out_t += num if(count_t%3 == 0 and num != data_test[-1]): out_t += ',' print(out_t[::-1])