S = input() for i in range((len(S) - 1) % 3 + 1, len(S), 3): print(S[max(i - 3, 0):i], end=',') print(S[i:])