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