N = input()[::-1] print(*list(map(lambda x: x[::-1], [N[i: i + 3] for i in range(0, len(N), 3)]))[::-1], sep=",")