tau = {'a' : 'b', 'b' : 'c', 'c' : 'a', 'd' : 'd' } decrypt ( "aabcd", tau ) decrypt ( "dcba", tau )