Why Assignment not work?

https://codeforces.com/contest/474/submission/70366232

why res[i]=s[j][k+1]; and res[i]=s[j][k-1];
not works