n = input()[::-1] l = [n[i:i+3] for i in range(0, len(n), 3)] print(','.join(l)[::-1])