import math n = input() for i in range(math.ceil((len(n)+1)/3)-1): n = n[:-3*i-3-i]+','+n[-3*i-3-i:] if n[0]==',': print(n[1:]) else: print(n)