s=input()[::-1] s=[s[i*3:(i+1)*3] for i in range(len(s)//3+1) if len(s[i*3:i*3+3])>0] print(",".join(s)[::-1])