def parse(inFile):
return inFile.readline()
def hint(x,w1,w2):
for i in xrange(len(w1)):
x[w1[i]] = w2[i]
def solve(content):
dictionary = {}
hint(dictionary, """ejp mysljlyc kd kxveddknmc re jsicpdrysi
rbcpc ypc rtcsra dkh wyfrepkym veddknkmkrkcd
de kr kd eoya kw aej tysr re ujdr lkgc jv""", """our language is impossible to understand
there are twenty six factorial possibilities
so it is okay if you want to just give up""")
hint(dictionary, "y qee", "a zoo")
hint(dictionary, "z", "q")
return "".join([dictionary[c] for c in content])
if __name__ == "__main__":
from GCJ import GCJ
GCJ(parse, solve, "/Users/lpebody/gcj/2012_q/", "a").run()
ZGVmIHBhcnNlKGluRmlsZSk6CiAgICByZXR1cm4gaW5GaWxlLnJlYWRsaW5lKCkKCmRlZiBoaW50KHgsdzEsdzIpOgogICAgZm9yIGkgaW4geHJhbmdlKGxlbih3MSkpOgogICAgICAgIHhbdzFbaV1dID0gdzJbaV0KCmRlZiBzb2x2ZShjb250ZW50KToKICAgIGRpY3Rpb25hcnkgPSB7fQogICAgaGludChkaWN0aW9uYXJ5LCAiIiJlanAgbXlzbGpseWMga2Qga3h2ZWRka25tYyByZSBqc2ljcGRyeXNpCnJiY3BjIHlwYyBydGNzcmEgZGtoIHd5ZnJlcGt5bSB2ZWRka25rbWtya2NkCmRlIGtyIGtkIGVveWEga3cgYWVqIHR5c3IgcmUgdWpkciBsa2djIGp2IiIiLCAiIiJvdXIgbGFuZ3VhZ2UgaXMgaW1wb3NzaWJsZSB0byB1bmRlcnN0YW5kCnRoZXJlIGFyZSB0d2VudHkgc2l4IGZhY3RvcmlhbCBwb3NzaWJpbGl0aWVzCnNvIGl0IGlzIG9rYXkgaWYgeW91IHdhbnQgdG8ganVzdCBnaXZlIHVwIiIiKQogICAgaGludChkaWN0aW9uYXJ5LCAieSBxZWUiLCAiYSB6b28iKQogICAgaGludChkaWN0aW9uYXJ5LCAieiIsICJxIikKICAgIHJldHVybiAiIi5qb2luKFtkaWN0aW9uYXJ5W2NdIGZvciBjIGluIGNvbnRlbnRdKQoKaWYgX19uYW1lX18gPT0gIl9fbWFpbl9fIjoKICAgIGZyb20gR0NKIGltcG9ydCBHQ0oKICAgIEdDSihwYXJzZSwgc29sdmUsICIvVXNlcnMvbHBlYm9keS9nY2ovMjAxMl9xLyIsICJhIikucnVuKCkKCiAgICAgICAgICAgIAo=