Skip to content

Instantly share code, notes, and snippets.

@spscream
Created July 19, 2013 10:26
Show Gist options
  • Select an option

  • Save spscream/6038194 to your computer and use it in GitHub Desktop.

Select an option

Save spscream/6038194 to your computer and use it in GitHub Desktop.
import sys;g=open(sys.argv[1]).next;n=range
for o in n(int(g())):
r,p,c=('',0,g()[:-1])
for w in g()[:-1]:
if w==" ":r+=w
else:r+=chr(n(97,123)[ord(w)-97-int((c+c[::-1])[p%len(c*2)])]);p+=1
print r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment