n = input() nr = n[::-1] ans = "" for i in range(len(nr)): ans += ans.join(nr[i]) #print(ans,i) if i != len(nr)-1 and i % 3 == 2: ans += ans.join(",") print(ans[::-1])