R=raw_input w=R() exec'_=R()'+'+"\\n"+R()'*11 for n in 13,1,12,1:_=(n*_)[::-n].replace(w," "*len(w)) R(_)