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