n = input() n = n[::-1] res = "" for i, v in enumerate(n): res += v if (i + 1) % 3 == 0 and i < len(n) -1: res += "," print(res[::-1])