var s,t:string(9999);i,j,l:word;begin repeat readln(s);l:=length(s);str(t,s:l+79,0:80,t)until eof;repeat inc(j);s:='';for i:=0to 6do s:=s+Copy(t,i*(l+159)+j,80)+^j;if s[294]>^`then s[294]:='*';writeln(s)until j>l+78end.