n = input() n = n[::-1] ret = '' for i in range(len(n)): ret += n[i] if i%3==2: ret += ',' print(ret[::-1] if ret[-1]!=',' else ret[::-1][1:])