Reverse BWT by hirose

while 1:n,m=raw_input().split();s=m;l=len(m)+1;exec"s=zip(m,sorted(s));"*l;print`s[int(n)]`[8:~l:6]

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top