def decoder(permutation):
    """
    decoder takes a permutation array and returns the
    corresponding depermutation array necessary to decode
    a permuted string
    """
    depermutation = []
    for x in range (0, len (permutation)):
        depermutation.append (permutation.index(x))
    return depermutation