s = input() ans = "" while len(s) > 3: c = s[-3:] s = s[:-3] ans += "," + c print(s +ans)