while 1: r=(raw_input()*27).split(",")[94::92] if r[1:]:print",".join(r)