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