s = input()[::-1] t = '' for i in range(0,len(s),3): t += s[i:i+3] + ',' print(t[-2::-1])