n=input()[::-1] ans=str() for i in range(len(n)): ans+=n[i] if i!=0 and (i+1)%3==0: ans+="," if ans[-1]==",": ans=ans[:len(ans)-1] print(ans[::-1])