rem_s = lambda x: list(filter(str.isdigit, x))
two_d = lambda x: x if len(x[-1]) > 1 else x[:-2] + [x[-2][:2]] + [[x[-2][-1], x[-1][-1]]]
raw_p = lambda x: '-'.join(map(''.join, two_d([x[i:i+3] for i in range(0, len(x), 3)])))
phone = lambda x: raw_p(rem_s(x)) if len(rem_s(x)) > 3 else ''.join(rem_s(x))
while True:
	inp = str(raw_input())
	if inp == '':
		break
	else:
		print(phone(inp))