for each(c in readline(d=s='\n'))d^=~putstr(+d?s+c:c)-c,d?0:s+=' '