q=r=raw_input();l=len(r);exec l%8*("print r;"+"r,q=r[1:]+q[q!=r<'|'or hash(q[:3])%283%3],r;"*l)