// yukicoder: No.784 「,(カンマ)」
// 2019.4.12 bal4u

#include <stdio.h>
#include <stdlib.h>

#define gc() getchar()
#define pc(c) putchar(c)

int ins(char *s)
{
	char *p = s;
	do *s = gc();
	while (*s++ > ' ');
	*--s = 0;
	return s - p;
}

char s[15];

int main()
{
	int w;
	char *p;

	w = ins(p=s);
	if (w %= 3) while (w--) pc(*p++);
	while (*p) {
		if (p != s) pc(',');
		w = 3; while (w--) pc(*p++);
	}
	pc('\n');
	return 0;
}