import re while 1:print(re.sub(r"(...)( \W\S ) ",r" \2\1",input()))