var s:string;i,j,k,n:comp;begin repeat readln(k);read(s,n);for i:=1to abs(n)do for j:=1to k do write(s[j+(k-j*2+1)*ord(n<0)]);writeln until 0>0end.
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page