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))
cmVtX3MgPSBsYW1iZGEgeDogbGlzdChmaWx0ZXIoc3RyLmlzZGlnaXQsIHgpKQp0d29fZCA9IGxhbWJkYSB4OiB4IGlmIGxlbih4Wy0xXSkgPiAxIGVsc2UgeFs6LTJdICsgW3hbLTJdWzoyXV0gKyBbW3hbLTJdWy0xXSwgeFstMV1bLTFdXV0KcmF3X3AgPSBsYW1iZGEgeDogJy0nLmpvaW4obWFwKCcnLmpvaW4sIHR3b19kKFt4W2k6aSszXSBmb3IgaSBpbiByYW5nZSgwLCBsZW4oeCksIDMpXSkpKQpwaG9uZSA9IGxhbWJkYSB4OiByYXdfcChyZW1fcyh4KSkgaWYgbGVuKHJlbV9zKHgpKSA+IDMgZWxzZSAnJy5qb2luKHJlbV9zKHgpKQp3aGlsZSBUcnVlOgoJaW5wID0gc3RyKHJhd19pbnB1dCgpKQoJaWYgaW5wID09ICcnOgoJCWJyZWFrCgllbHNlOgoJCXByaW50KHBob25lKGlucCkp